+ 3

How to fix it ? I wanted to make circles over circles over circles.. but nazi python makes swastik.. please help me out

import turtle g = turtle.Turtle() def make_circle(x): x=1/x a=x while a<=360/x: g.forward(1) g.left(x) a=a+1 g.pu() g.right(90) g.forward(x) g.left(90) g.pd() while True: n=0.1 make_circle(n) n=n+1

13th May 2020, 3:00 PM
Leonardo Jk
4 ответов
+ 2
I found a code witch draws concentric circles. If that's what you wanna do, here's the code: import turtle turtle.penup() for i in range(1, 500, 50): turtle.right(90) # Face South turtle.forward(i) # Move one radius turtle.right(270) # Back to start heading turtle.pendown() # Put the pen back down turtle.circle(i) # Draw a circle turtle.penup() # Pen up while we go home turtle.home() # Head back to the start pos
14th May 2020, 9:32 AM
Batcher21
Batcher21 - avatar
+ 2
If that worked, please upvote :)
14th May 2020, 3:29 PM
Batcher21
Batcher21 - avatar
+ 1
Hey! I run this program on code playground to see what was going wrong, and it shows an error with turtle and tkinter. It seems that turtle module use tkinter but something doesn't work. I think the problem isn't in your code, 'cause the errors are about the modules you imported, the error ocurrs inside the module.
14th May 2020, 9:28 AM
Batcher21
Batcher21 - avatar
+ 1
Thanks😁
14th May 2020, 3:13 PM
Leonardo Jk