so I am currently trying to do a currency converter. Here is the code:
Choice = 0
Amount = 0
Converted = 0
Staff = False
print("Welcome to currency converter - Here are your options: ")
print("1. Dollars to sterling")
print("2. Euros to sterling")
print("3. Sterling to dollars")
print("4. Sterling to euros")
Choice=input("Please type the number of your choice")
Amount=input("Enter the amount you would like to convert")
if Choice == "1":
Amount = Amount * 0.80
elif Choice == "2":
Amount = Amount * 0.89
print(Amount)
This is the error I get:
TypeError: can't multiply sequence by non-int of type 'float'
I have tried these solutions:
Amount=input(float("Enter the amount you would like to convert"))
if Choice == "1":
Amount = Amount * float(0.80)
if Choice == "1":
Amount = float(Amount * 0.80)
None of these solutions work and I keep getting the same error - I would appreciate it when providing a fix you explain why this error occurs in a basic way - Thanks!