Question: Write a program that checks if a temperature (temp) is above 30. If yes, print "It's hot!". Otherwise, print "It's cool.".


Python code:

# Define the temperature variable

temp = 35  # Change this value to test different cases


# If-else decision

if temp > 30:

    print("It's hot!")

else:

    print("It's cool.")