College for Kids - Python: Lab 5

In this lab you will be reading through files and drawing according to the input to create a picture.

Download the following files
These are files that you will be reading through. Read through them one at a time. It does not matter which order you read them
file 1 file 2 file 3
Download the following file: this is the base code in the lab. Note: EVERYTHING NEEDS TO BE ON THE DESKTOP Lab 5

You will need to use if statements to be able to tell your turtle where to go. There are four commands in the file:

  • goto x y This should move your turtle to the specified coordinate
  • forward x This should move your turtle forward by x amount
  • right x This should turn your turtle right by x degrees
  • left x This should turn your turtle left by x degrees
You should read through the file and follow the insturctions to draw a picture. Each instruction is on a new line: e.g. goto x y forward x Note: Because the input will get read in as a string you will need to cast the x's and y's

If you have already finished the lab raise your hand and let me know!