...

Exercise: Roller Coaster Safety

A roller coaster has safety requirements. You can ride if you meet the height requirement and have no health restrictions:

  • 48 inches or taller (ride alone), or
  • 42-47 inches with an adult accompanying you
  • No heart problems or back issues (regardless of height)

Your Task

Write code to check if someone can ride. Print "Enjoy the ride!" if they qualify, otherwise print "Sorry, you cannot ride."

Hint: You need to combine height conditions with OR, then use AND to check health issues.

Variables

No variables

Loading...

Output (Console)