Turtle Graphics with Conditionals
Last updated
Last updated
An if conditional statement can be True or False. When the if statement executes, the condition is tested and if it is true, the indented block of code is executed.
if <conditional statement>:
<do something>
else:
<do something>
If you have a pattern where every other statement alternates, you can use use the values of the stepper variable to determine if the value of the variable is odd or even.