Toss-a-coin
Model was written in NetLogo 6.0
•
Viewed 596 times
•
Downloaded 14 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ toss marker ] to setup clear-all create-turtles 10 ask turtles [set shape "bug"] ifelse heads = TRUE [set toss 1] [set toss 0] ifelse heads = TRUE [set marker "heads"][set marker "tails"] reset-ticks end to go ifelse heads = TRUE [set toss 1] [set toss 0] ifelse heads = TRUE [set marker "heads"][set marker "tails"] ifelse toss = random 2 [output-print word marker " it is ,You have won"] [output-print word marker " it is ,You have lost"] ask turtles [ pendown rt random 360 ; wander around aimlessly fd 10 ] tick end ;; the actual plotting code is in the plot in the Interface tab. ;; the plot has setup code and the pen in it has update code. ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There is only one version of this model, created almost 7 years ago by Pradeep Ankem.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Toss-a-coin.png | preview | Preview for 'Toss-a-coin' | almost 7 years ago, by Pradeep Ankem | Download |
This model does not have any ancestors.
This model does not have any descendants.