# All lines like this one that begin with a "#" are comments.
# All other non-blank lines are program statements.
# Import the visual library.
from visual import *
# Set the time
t = 0
# Set the timestep
dt = 1
# The next line causes the indented lines that follow
# it to be repeatedly executed in the loop. The construct:
# 1==1
# means "is one is equal to one?" which is always true.
# Thus double equal signs like this mean something different
# than a single equal sign, such as is used above to set the
# values of the time and the timestep.
while 1==1:
# Do one calculation every second
rate(1)
# Print the time and then increment its value.
# Here the single equal sign means set the value of t to
# whatever appears to the right of the equal sign.
print t
t = t + dt
# End of the while loop. Go back to the rate(1) statement and
# start over.