CS 101: Introduction to Computer Science
James Madison University, Fall 2019 Semester

Lab07: Introduction to Python

Instructions

Today will be a fun and exciting adventure. Some of you will be writing your first computer programs, and others will be programming in Python for the first time. Either way, we hope you'll enjoy this lab!

  1. Work through the Hour of Code by Trinket.io. For best results, make your browser window full-screen (as shown above). You should be able to see the source code and the running program at the same time.

  2. Complete the open-ended exercise at the end named "A Picture with Tina and Tommy". Your program must include the following elements:

    1. Use the functions: forward, backward, right, left
    2. Use the functions: penup, pendown, goto, write
    3. Use the functions: circle, begin_fill, end_fill
    4. Write at least one list and one for loop
    5. Write at least one if/else statement
    6. Write and call at least one function
  3. Refer to the Documentation for turtle for more ideas. Be creative!

  4. Copy and paste your code in a file named Lab07.py. Write your name on the first line of the file in a comment (e.g., # Your Name). Make sure you can run the entire program offline (e.g., test it with IDLE).

  5. Submit your Lab07.py via Canvas.