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

Turtle Graphics Activities for Students

The document outlines activities for a secondary school module using the Turtle graphics library in Python. It includes instructions for drawing shapes, modifying code for filling colors, and creating a star with specific angles. The activities are designed to teach students programming concepts through visual representation.

Translated by

ScribdTranslations
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)
6 views2 pages

Turtle Graphics Activities for Students

The document outlines activities for a secondary school module using the Turtle graphics library in Python. It includes instructions for drawing shapes, modifying code for filling colors, and creating a star with specific angles. The activities are designed to teach students programming concepts through visual representation.

Translated by

ScribdTranslations
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

SSB Moknine High School 1 erasecondary year

Module Turtle
TP2
Activity 1:

from turtle import * from turtle import *


pensize(2) pensize(2)
forward(100) Block of ………………………………….
right(90) treatments that are forward(100)
forward(100) on on on on right(90)
right(90)
can replace it
forward(100)
right(90) by ..........
forward(100)

Activity2 :
In a new window, write this code and save it under the name "[Link]".
from turtle import * Import all the commands from the turtle module

pensize(2) Increase the size of the pencil

up() Lift the pencil

goto(-300,-180) Change the pencil coordinates


down() ………………… the pencil
for i in range(4): …………………. the treatments 4 times
forward(50) ............ from a distance of 50
right(90) …………………. to the right of 90°

Modify the previous code:


from turtle import * Result obtained
pen size(2)
up()
goto(-300,-180)
down()
begin_fill()
fillcolor("blue")
for i in range(4):
forward(50)
right(90)
end_fill()

Professor: Karchoud Radhouane Page1


SSB Moknine High School 1 yearsecondary year

from turtle import *


pensize(2)
up()
goto(-200,-180)
down()
for i in range(4):
forward(50)
right(90)
up()
goto(-200,180)
down()
………………………………
………………..
………………..
up()
……………………..
down()
for i in range(4):
move forward 50
right(90)
………. Modify the code so that the squares are
…………………….
……………. fill in with a color (blue by
for i in range(4): example).
forward(50)
right(90)
up()
goto(0,-50)
down()
color("grey")
……………….

Work to be done:
Draw an star with the Turtle module with a red outline and fill.
The angle between two segments is equal to 144.
Code to write:

Prof : Karchoud Radhouane Page2

You might also like