Answer to Question #226362 in Python for katta saiganesh

Question #226362

Write a program to display a customized message based on temperature T


input1 input2

-50.5 5.7


output output

Freezing weather Very Cold weather


1
Expert's answer
2021-08-16T01:03:56-0400
def get_weather_report (T):
    if T<0:
        return "Freezing weather"
    if T>=0 and T<10:
        return "Very cold weather"
    if T>=10 and T<20:
        return "Cold weather"
    if T>=20 and T<30:
        return "Normal weather"
    if T>=30 and T<40:
        return "Hot weather"
    if T>=40:
        return "Very hot weather"


T= float(input())
print(get_weather_report(T))






Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS