← Back to If Statements
Question 226
Tall Enough To Ride
Tall Enough To Ride
Read a height in centimetres and an age in years and decide whether the person may ride the coaster: they must be at least 120 cm tall and at least 8 years old. Print Enjoy the ride when both hold and Sorry, not today otherwise. Input: two lines, the height then the age, each an integer, no prompts. Output: one line. The condition with and is given; fill in the two prints.
Expected Output:
Enjoy the ride= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
If StatementsOperators
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.