0
Spot the error in python coding.
temperatures={ â New Yorkâ:105} 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â)
1 Answer
+ 4
got them!
temperatures={'new york':105}
if ('new york' in temperatures):
if temperatures['new york']>90:
print('The city is melting')
elif temperatures['new york']<90:
print('The temperature in New York is', temperatures['new york'])
else:
print('The temperature in New York is unknown')
if you want the code:
https://code.sololearn.com/ch9sYyEtHwmt/?ref=app