samedi 26 septembre 2020

Hi, I'm getting an invalid syntax error on line 20 of the following code I'm trying to write, how can I correct?

temperatures = { 'Seattle': 56.5, 'New York': 105, 'Kansas City': 81.9, 'Los Angeles': 76.5 }

temperatures = { 'Seattle': 56.5, 'New York': 105, 'Kansas City': 81.9, 'Los Angeles': 76.5 }

if 'New York' in temperatures: if temperatures['New York'] > 90: print('The city is melting') else: print('The temperature in New York is', temperatures['New York']) else: print('The temperature in New York is unknown.')

Aucun commentaire:

Enregistrer un commentaire