Amity
Alert — Restricted Zone Monitor
“If it swims in the box, we sound the bell.” — Harbor Watch
Challenge:
Trigger an alert if any position lies inside the restricted rectangle.
Operations • Safety Perimeter
Task:
Implement
check_alert(positions, zone)
returning
'ALERT'
or
'SAFE'
.
positions
is a list of
(x,y)
.
zone
is
(x1,y1,x2,y2)
(inclusive bounds).
Click
Run Unit Tests
. If all tests pass, you'll get the flag.
def check_alert(positions, zone): # Your code here return "SAFE" # Test runner do not edit below run_selected_test()
Run Unit Tests
Output or flag will appear here...