mardi 8 mai 2018

Syntax error within IF command

print ('Here are the availible currency choices for today:')  
currencylist = ['US Dollar','Kenyan Shilling','Brazilian Real','Canadian 
Dollar','Indian Rupee','Philippine Peso','Indonesian Rupiah']  
print(*currencylist, sep='\n')  
currency= input(str('Which currency would you like to choose? '))  
pound= input(float('Please enter the amount you would like to exchange. £')  
if currency == ('US Dollar')  
    rate= 1.52  
    print rate

I keep getting a syntax error when I try and define the 'rate' variable. Any ideas?

Aucun commentaire:

Enregistrer un commentaire