Python Turtle: If/Else Intro

This assignment serves as a hands-on intro to if/else statements in Python.

  1. Type the code provided below into a brand new program in your Codehs Sandbox as a Python Turtle program. Name your code like this: yourlastname_ifelse (milstead_ifelse).
  2. You will create two functions in this program – one that draws a square and one that draws a triangle (or pick two other shapes). This is a sample triangle function:
  3. Call these two functions in the appropriate places in this program so that either a square or triangle are drawn depending on what the player chooses.

Here’s some sample code get you started – type this in to your new program.