Python - Drawing with Loops
Using loops we can make the code for drawing shapes more efficient.
Watch the video below to see how to use loops when drawing in Python
Watch the video below to see how to use loops when drawing in Python
pythonLoopDraw.mp4
Challenges
Challenges
See the demonstrations below...
Create a program that can draw a hexagon using the turtle.
The program should ask the user how long the sides of the hexagon should be
You should use a loop to reduce the amount of code that you need to write.
Write a program that will ask the user how many sides the shape should have and how long each side should be.
Write a program that will draw the following shape as efficiently as possibleā¦
Demo: Challenge 1
Demo: Challenge 2
Demo: Challenge 3
Key Words
Key Words
Loop
Loop
A data structure that allows the code inside it to be repeated.
Turtle Graphics
Turtle Graphics
A way of drawing images on a computer by moving a sprite (turtle) across the screen.