Superstar ⭐
Typing forward and right five times is tiring. Here's a sneak
peek of a superpower you'll learn soon — the for loop. It repeats
code for you:
for i in range(5): # repeat 5 times:
turtle.forward(150) # (these indented lines
turtle.right(144) # are what gets repeated)
The secret of a 5-pointed star: walk, then turn 144°, five times. The turtle crosses over its own path and — boom — a star! ⭐
Your mission
- Use the loop to draw a 5-pointed star (turn 144° each time)
- Give it a color with
pencolor()and a thick pen withpensize()