JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
Debug 5 .1. Freezing Point with starter code
Share
Explore
Gallery
Debug 5 .1. Freezing Point with starter code
Debug 5 .1. Freezing Point with starter code
The Task
Python Starter Code
Code Clips
Python Starter Code
Copy and paste the code below into your
main.py
file before you begin the task.
# 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'
)
Gallery
Share
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.