...

Exercise: Swimming Pool Rules

Our swimming pool has a simple safety rule. You can swim if either condition is true:

  • You know how to swim on your own, or
  • A lifeguard is on duty to supervise

This makes sense from a safety perspective. You're safe if you can handle yourself in the water, or if there's professional supervision available.

Your Task

Complete the code sample to print "You can swim!" if swimming is allowed, and "Swimming not allowed for safety reasons." if not.

Loading...

Output (Console)