Find the error in following code then underline error and also write correct statement after correcting:
weather = ‘raining’
if weather = ‘sunny’:
Print(“wear sunblock”) else if weather == “snow”:
Print(“wear sweater”) else:
Print(weather)
Answers
Answered by
5
Answer:
First all the Ps in print statement are in capital letters...
Corrected code:
weather = 'raining'
if weather == 'sunny':
print("Wear sunblock")
elif weather == 'snow':
print("Wear sweater")
else:
print("Weather*)
# This is in python...
# HOPE THIS HELPS YOU!!
Similar questions
Math,
3 months ago
Math,
3 months ago
Social Sciences,
3 months ago
English,
7 months ago
English,
7 months ago
Social Sciences,
1 year ago