Skip to content
Solution Debug 5.1. Freezing Point
  • Pages
    • icon picker
      Solution
    • The Task
    • Python Starter Code
    • Code Clips

Solution

Solution

solution
# Display a blank line
print('\n')

# Prompt use for a value
temperature = int(input('Please enter temperature (degrees celsius): '))

# Display a blank line
print('\n')

# Check if temperature is freezing.
# If it is display freezing message else display above freezing message
if temperature <= 0 :
# conditional message output
print('The temperature is freezing')
else :
print('The temperature is above freezing')
# end if
# Display a blank line
print('\n')
or temperature > 0 display above else freezing
original
# Display a blank line
print('\n')

# Prompt use for a value
temperature = int(input('Please enter temperature (degrees celsius): '))

# Display a blank line
print('\n')

# Check if temperature is freezing.
# If it is display freezing message else display above freezing message
if temperature < 0 :
# conditional message output
print('The temperature is freezing')
else :
print('The temperature is freezing')
# end if
# Display a blank line
print('\n')
 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.