To draw a spiral helical pattern using Python Turtle Graphics - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Wednesday, July 1, 2020

To draw a spiral helical pattern using Python Turtle Graphics










Question

To draw a spiral helical pattern using Python Turtle Graphics.

Sample TestCase Expected Output

  













Answer


import turtle 
loadWindow = turtle.Screen() 
turtle.speed(2) 
  
for i in range(100): 
    turtle.circle(5*i) 
    turtle.circle(-5*i) 
    turtle.left(i) 
  
turtle.exitonclick() 

Follow Us For More...

No comments:

Post a Comment