Open jesmet opened 1 day ago
t=int(input("enter the current temperature")) If t<0: print("stay indoors and drink hot choclate") elif 0>=t and t<=10: print("wear warm clothes and go for a walk ") elif 11>=t and t>=20: print("perfect weather for picnic ") elif 21<=t and t>=30: print("great day for beach trip") else: print("stay cool and hydrated inside")
Temp=int(input("enter the temperature ")) If temp<0: Print('stay indoor and drink hot chocolate ') elif temp>0 and temp<10: Print('wear warm clothes and go for a walk') elif temp>10 and temp<20: Print('perfect weather for a picnic') elif temp>21 and temp<30: Print('great day for a beach') else: Print('stay cool and hydrated indoors')
t=int(input("enter the current temperature")) If t<0: print("stay indoors and drink hot choclate") elif 0>=t and t<=10: print("wear warm clothes and go for a walk ") elif 11>=t and t>=20: print("perfect weather for picnic ") elif 21<=t and t>=30: print("great day for beach trip") else: print("stay cool and hydrated inside")
elif statement
Write a Python program that takes the current temperature as input and suggests an activity based on the following criteria:
Temperature Below 0
"Stay indoors and drink hot chocolate."
Temperature between 0 to 10
"Wear warm clothes and go for a walk."
Temperature between 11 to 20
"Perfect weather for a picnic."
Temperature between 21 to 30
"Great day for a beach trip!"
Temperature Above 30
"Stay cool and hydrated indoors."