To draw a Star using Python Turtle Graphics - Learn Engineering

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

Breaking

Thursday, June 25, 2020

To draw a Star using Python Turtle Graphics







Question

To draw a Star using Python Turtle Graphics.

Sample TestCase Expected Output

  




Answer


# import turtle library
import turtle             
my_pen = turtle.Turtle()      
for i in range(50):
   my_pen.forward(50)           
   my_pen.right(144)               
turtle.done()

Follow Us For More...

No comments:

Post a Comment