The most common answer is:
dance_rain = False
if dance_rain:
print(“I’m going to dance in the rain!”)
else:
print (“I’m going to dance in the sun!”)
To ensure the code works correctly in Python, especially Python 3, you need to use parentheses for the print
function calls and properly indent the code within the if
and else
blocks.
Here’s the corrected version:
dance_rain = False
if dance_rain:
print("I'm going to dance in the rain!")
else:
print("I'm going to dance in the sun!")