March 25, 2024
ask
, set
, let
, create-turtles
, ifelse
, and one-of
.This is the programmers “Do as I say and not as I do!” Think of commenting as taking notes in your learning.
“Comments are needed to make code easier for others to understand, but they are also very useful to ourselves: after a few days or weeks go by, you might not remember why you wrote some part of your program as you did instead of in some other way.”
if
or ifelse
statements (i.e. after closing using ]
character);-----------
to separate procedures in long programs.show (word elev1 " " elev2 " " elevation)
The point is to make your code readable and understandable, so some caveats:
Intro to Quantitative Biology, Spring 2024