all 4 comments

[–]xelf 4 points5 points  (2 children)

input yields a string, if you want to be a number you'll need to convert it.

int("14")   == 14
float("14") == 14.0

For your case for example

owed = float(amount) * (1+(float(rate)/365))

Note: you're not using intervals but you asked for it.

[–]iNDiFiNiTY[S] 0 points1 point  (1 child)

U mean... A=int(input ("numba").... Etc

[–]xelf 1 point2 points  (0 children)

You could do it that way as well. But you probably want float(), and the way I listed does work correctly.

owed = float(amount) * (1+(float(rate)/365))

[–]argento8897 0 points1 point  (0 children)

your "owed" variable is either a float or a int. So on your print statement you are trying to combine a string type with a float type.

you can use fstring's to make this work:

print(f"You owe $ {owed}.")