Serendip is an independent site partnering with faculty at multiple colleges and universities around the world. Happy exploring!
Remote Ready Biology Learning Activities has 50 remote-ready activities, which work for either your classroom or remote teaching.
Learning
Learning code
turtles-own [ health ]
to setup
ca
crt 1
ask turtles [ set health 1 set color green]
ask patches [if pycor > 0 and pycor < 20 and pxcor = 0 [ set pcolor red ]]
end
to go
ask turtles [ ifelse health = 0 [ go2 ] [ set heading random 360 fd 1 if pcolor = red [set health 0 set color yellow ]]]
end
to go2
set heading random 360
if [pcolor] of patch-ahead 1 = red [ set heading heading + 180]
fd 1
end