I am currently writing a program that receives input from users and processes them in separate functions. MRE:
def prompt_user():
money1 = input("insert a value")
money2 = input(" insert another value")
return money1, money2
def add(money1, money2):
cash = int(money1) + int(money2)
return cash
two_values = prompt_user()
total = add(*two_values)
print("you have "+ str(total))
My problem with the code above is that it's really ugly. How am I able to process the data from users WITHOUT writing int() for every variable I used?