Question 411: What will happen if the following code is executed?temperature = 25 if temperature > 30: print("It's hot!") elif temperature > 20: print("It's warm.") else: print("It's cool.")
tcs
wipro
infosys
general
aptitude
conditional-statements
python-programming
The code checks multiple conditions usingifandelif. Sincetemperatureis 25, it satisfies the second condition (temperature > 20), and the corresponding code block inside theelifwill be executed, printing "It's warm."