«Неупорядоченные типы: int () <str ()»
Я пытаюсь сделать пенсионный калькулятор прямо сейчас на Python. С синтаксисом все в порядке, но когда я запускаю следующую программу:
def main():
print("Let me Retire Financial Calculator")
deposit = input("Please input annual deposit in dollars: $")
rate = input ("Please input annual rate in percentage: %")
time = input("How many years until retirement?")
x = 0
value = 0
while (x < time):
x = x + 1
value = (value * rate) + deposit
print("The value of your account after" +str(time) + "years will be $" + str(value))
Это говорит мне, что:
Traceback (most recent call last):
File "/Users/myname/Documents/Let Me Retire.py", line 8, in <module>
while (x < time):
TypeError: unorderable types: int() < str()
Любые идеи, как я мог решить это?