JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
Tyre Pressure with starter code
Share
Explore
Gallery
Tyre Pressure with starter code
Tyre Pressure with starter code
The Task
Python Starter Code
Code Clips
The Task
Activity: Tyre Pressure 🏎️ 🚴
Start Here
Explore the program
Run the program, try entering these values for tyre pressure:
7
,
6
,
8
,
0
Can you explain the result that is output?
try changing the double
==
to
!=
and
change the display message to
Warning pressure error
run the program and re-enter
7
,
6
,
8
,
0
what happens now?
Try using other comparison operators and run the program to see what happens. Look in
CodeClips
to see other comparison operators.
Good luck! 🍀
Sample output
before edit
Please enter the tyre pressure: 7
OK, the tyre pressure is correct
after edit
Please enter the tyre pressure: 6
Warning pressure error
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.