Spot the error in python coding. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

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’)

24th Feb 2019, 3:26 AM
Safina Nganga
Safina Nganga - avatar
1 Answer
+ 3
Line #1, The Key ' New York' is the reason. remove the space on index 0
17th Sep 2019, 1:45 AM
Name Omitted until I come back