Python Forum
Drawing circles with loops (solved)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drawing circles with loops (solved)
#1
Hi everyone, I'm currently trying to make a program to draw circles with loops. The problem I'm is, I have to make it so every circle drawn would be 10 pixels bigger than the previous one. I'm currently stuck on what to do.

Here is my code:
import turtle
a = 1
size = 20
i=0
for i in range(0,200,10):
    turtle.bgcolor("green")
    turtle.color("blue")

    while a <= 5:
        a += 1
        turtle.penup()
        turtle.goto(0,-size-i)
        turtle.pendown()
        turtle.circle(size+10)
        size += 10
Edit: Sorry about that guys, I had a brain fart and managed to find a easier way to do it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help drawing circles with turtle songminguk 3 4,476 Dec-19-2017, 08:43 PM
Last Post: squenson

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020