Draw a square using the turtle module - Python

0 votes
How do I drow a square using the turtle module in python? It's probably a very stupid doubt but I'm new to python. Help me out. Thank you
Jun 21 in Python by Baily
88 views

1 answer to this question.

0 votes

Hey @Baily, use something like this:

import turtle

sq = turtle.Turtle()
for i in range(4):
    sq.forward(50)
    sq.right(90)

turtle.done()
answered Jun 21 by Himanshu

Related Questions In Python

0 votes
1 answer

How do I draw a hexagon using the turtle module of python?

Hey @Jinu, try this: import turtle polygon = ...READ MORE

answered Jun 23 in Python by Haseeb
410 views
0 votes
1 answer
0 votes
1 answer

How do I draw a semi-circle only using turtle - Python

Try this: import turtle turtle = turtle.Pen() turtle.left(90) for x in ...READ MORE

answered Jul 5 in Python by Bheem
524 views
+2 votes
1 answer

How can I record the X,Y limits of a displayed X,Y plot using the matplotlib show() module?

A couple hours after posting this question ...READ MORE

answered Dec 27, 2018 in Python by anonymous
98 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 419 views
+4 votes
6 answers
0 votes
1 answer

How do I create a star using the turtle module of python?

Hey @Jinu, Try something like this: import turtle star = ...READ MORE

answered Jun 21 in Python by Neha
75 views
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 16,418 views