16.8k views
2 votes
Create a variable ‘temp’ and assign the value in Celsius. Display the message ‘It’s extremely hot day today!’ if the temperature is greater than 40 degree C otherwise, displays ‘It’s not too hot!

User Alaboudi
by
7.3k points

1 Answer

4 votes

Answer:

temp = 47

if temp > 40:

print("It’s extremely hot day today!")

else:

print("It’s not too hot!")

Step-by-step explanation:

*The code is in Python.

Create a variable called temp and set its value as 47

Check the temp using if-else structure. If the temp is greater than 40, print "It’s extremely hot day today!". Otherwise, print "It’s not too hot!".

User Ryrich
by
8.6k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.