Difference between revisions of "Turtle - Initials Assignment"

From WLCS
 
Line 19: Line 19:
 
# Define a function named '''fullInitials()''' that '''calls''' firstInitial() and lastInitial() and draws your full initials
 
# Define a function named '''fullInitials()''' that '''calls''' firstInitial() and lastInitial() and draws your full initials
 
# Test out fullInitials() with a function call
 
# Test out fullInitials() with a function call
# Now add some move commands that moves the turtle around the screen before your fullInitials() function call (*not* before the definition)
+
# Now add some move commands that moves the turtle around the screen before your fullInitials() function call
 +
*# Make sure all function definitions are at the top
 +
#* Be sure to make the function calls *after* the definitions
 
# Make your program draw your full initials in each of the four corners (you must use function calls)
 
# Make your program draw your full initials in each of the four corners (you must use function calls)

Latest revision as of 13:54, 24 February 2015

Objective(s):

  • You will use the Python turtle module to draw your initials on the screen
  • You will define functions that draw different letters
  • You will call turtle functions to move the turtle around the screen
  • You will call the functions that you define to draw your letters

Resources:

Function Reminders:

  1. Define functions at the top
  2. Function calls always have parentheses

Directions:

  1. Create a file named initials.py
  2. Define a function named firstInitial() that draws your first name's initial
  3. Define a function named lastInitial() that draws your last name's initial
  4. Define a function named fullInitials() that calls firstInitial() and lastInitial() and draws your full initials
  5. Test out fullInitials() with a function call
  6. Now add some move commands that moves the turtle around the screen before your fullInitials() function call
    1. Make sure all function definitions are at the top
    • Be sure to make the function calls *after* the definitions
  1. Make your program draw your full initials in each of the four corners (you must use function calls)