0% found this document useful (0 votes)
12 views

Control and Customize Turtle Movements in Python Lesson 2

The document outlines a lesson on controlling and customizing Turtle movements in Python, focusing on functions like turtle.setx(), turtle.sety(), turtle.seth(), and turtle.dot(). It includes an assignment to create a unique Turtle design using these functions, emphasizing customization of the Turtle's appearance and movement. Submission guidelines require a .py file, a screenshot of the design, and a brief explanation of the project.

Uploaded by

220170
Copyright
© © All Rights Reserved
Available Formats
Download as KEY, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Control and Customize Turtle Movements in Python Lesson 2

The document outlines a lesson on controlling and customizing Turtle movements in Python, focusing on functions like turtle.setx(), turtle.sety(), turtle.seth(), and turtle.dot(). It includes an assignment to create a unique Turtle design using these functions, emphasizing customization of the Turtle's appearance and movement. Submission guidelines require a .py file, a screenshot of the design, and a brief explanation of the project.

Uploaded by

220170
Copyright
© © All Rights Reserved
Available Formats
Download as KEY, PDF, TXT or read online on Scribd
You are on page 1/ 5

Control and Customize Turtle

Movements in Python

Lesson Objectives
By the end of the lesson, the learner should be
able to;

set the Turtle’s x-coordinate using turtle.setx().


set the Turtle’s y-coordinate using turtle.sety().
set the Turtle’s heading using turtle.seth().
draw dots using turtle.dot().
turtle.setx() turtle.sety()
Function Function

Sets the Turtle’s x-coordinate, leaving


the y-coordinate unchanged. Sets the Turtle’s y-coordinate,
leaving the x-coordinate
Syntax: turtle.setx(x)
unchanged.
Parameter: x (a number, integer or
Syntax: turtle.sety(y)
float).
Parameter: y (a number, integer
or float).
turtle.seth()
Function

Sets the Turtle’s heading (orientation) to a


specified angle.
Syntax: turtle.seth(to_angle) or turtle.sethea
ding(to_angle).
Parameter: to_angle (a number, integer or
float).
Common directions:

0°: East
90°: North
180°: West
270°: South
Draws a circular dot with a turtle.dot()
specified size and color. Function
Syntax: turtle.dot(size=None,
*color)
Parameters:
size: Diameter of the dot
(integer >= 1).
color: Color of the dot
(colorstring or numeric color
tuple).
Assignment
Create a Turtle Design
Objective:
The goal of this assignment is to reinforce your understanding of the Turtle library by creating a
unique design using the turtle.setx(), turtle.sety(), turtle.seth(), and turtle.dot() functions. You
will also customize the Turtle’s appearance and movement to create an engaging visual output.
Requirements
Use the following Turtle functions at least once in your program:

turtle.setx()
turtle.sety()
Submission Guidelines
turtle.seth()
1.

turtle.dot()
Submit your Python code as
Customize the Turtle’s speed and appearance (e.g., pen color, pen size, shape).
a .py file.
Include at least three dots and two directional changes in your design.
Include a screenshot of your
Add a title or label to your design using the turtle.write() function.
Turtle design.
Write a short explanation (2-3
sentences) describing your

You might also like