MIHS-18 Period 4 Grace Z, Keyi S

No preview image

1 collaborator

Default-person Grace Zhang (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.4 • Viewed 171 times • Downloaded 28 times • Run 0 times
Download the 'MIHS-18 Period 4 Grace Z, Keyi S' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


CHANGES

DEBUGGING: Added "end" to the to move-turtles tick procedure. Deleted "[" "]" from the xcor ycor code, added spaces between words and brackets. Added dash between "clear" and "all". Added brackets ([ ]) around "set pcolor green". Deleted comma between randomx-cor and randomy-cor.

WHAT IS IT?

This model is a test of student's coding skills.

HOW IT WORKS

The model will generate several errors when you try to click Setup of Go. You must "debug" the code before it will run.

HOW TO USE IT

Try clicking "setup". Use the ERROR message(s) produced as a clue to fixing the code.

THINGS TO NOTICE

There are several errors in this code. Fixing one "bug" may reveal another you were unaware of. Try to avoid creating new bugs in the process of fixing the old ones!

THINGS TO TRY

Use the "Programming Guide" and"NetLogo Dictionary" to help you figure out what is wrong with the code as written. Sometimes things are just mispelled or written with the wrong "syntax" (for example, a hyphen, a space or a set of brackets may be missing).

EXTENDING THE MODEL

Feel free to add new procedures to this model once you have it working, or move on to making your own model.

NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;   Debugger  - by L.F. Bencivengo, Jr.
;;   Have fun debugging this model!

to setup
  clear-all
  ask patches [ set pcolor green ]
  create-turtles 100
  ask turtles [ setxy random-xcor random-ycor]
  reset-ticks
end 

to go
  move-turtles
  tick
end 

to move-turtles
    ask turtles [
    right random 360
    forward 1
  ]
end 

There is only one version of this model, created over 6 years ago by Grace Zhang.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.