JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
Tyre Pressure
The Task
Code Clips
More
Share
Explore
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
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.