0% found this document useful (0 votes)
10 views2 pages

Assignment 2

The assignment focuses on understanding functions and enhancing drawing skills using turtle graphics. Students must define functions to draw each letter and number of their name and student number, ensuring consistent starting points and directions for the turtle. The final submission should include a .py file and a screenshot of the program running, with a requirement for colorful and neatly displayed drawings.

Uploaded by

singh.angad0905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Assignment 2

The assignment focuses on understanding functions and enhancing drawing skills using turtle graphics. Students must define functions to draw each letter and number of their name and student number, ensuring consistent starting points and directions for the turtle. The final submission should include a .py file and a screenshot of the program running, with a requirement for colorful and neatly displayed drawings.

Uploaded by

singh.angad0905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 2

Objective:

o To have a better understanding of functions


o Enhancing the drawing skills with turtle
o Understanding design ideas
o Practice using loops and if statement

Requirements:

In assignment 1, each one of you drew your student number and name with turtle, through the practice,
you should have learned how to control turtle.

In this assignment, you need to define functions to draw each of the letters/numbers in your name and
student number. For example, if you name is Amanpreet and your student number is 123235, you
should define functions for A, m, a, n, p, r, e, t, 1, 2, 3, 5.

Define a function to draw a dummy symbol to represent all the other characters.

Each letter/number including the dummy symbol should have different color.

Your program should prompt user to enter any characters/numbers in any sequence, no matter what
characters/numbers are entered, your program should print out neatly.

There are different ways to finish the task, I will introduce two ways below and you can use either of the
two or explore your own solution.

1. You need to make sure that each character’s starting point, ending point and the direction the
turtle is facing after drawing be consistent.
Starting point and ending point need to be consistent as
shown here (the direction your turtle is heading can’t be
shown here, but also need to be consistent, for example,
heading east, you can use seth() method, seth(0) will set the
direction to east). So it doesn’t matter number 1 is drawn
first or number 2 is drawn first; after the character is drawn,
we can simply make the turtle go to the next starting point
where the next character will be drawn.

2. Another way is to use a coordinate map(in your mind) to plan your character’s location; in this
case, you only need to pay attention to the characters’ starting point and the direction the
turtle is heading to, they (starting point and direction) need to be consistent.

Please make sure your drawing will be nicely displayed, which means your drawing should not be too
small or too big for computer screen.

Please upload your finished work (.py file) and the screen shot of running your program on Moodle.

You might also like