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 22, 2019 in Python by Baily
1,560 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 22, 2019 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, 2019 in Python by Haseeb
7,362 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 6, 2019 in Python by Bheem
10,200 views
0 votes
1 answer

How to a write reg expression that confirms an email id using the python reg expression module “re”?

Hey, @Roshni, Python has a regular expression module ...READ MORE

answered Jun 26, 2020 in Python by Gitika
• 65,770 points
924 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,423 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,042 views
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 22, 2019 in Python by Neha
1,551 views
0 votes
3 answers

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

FWIW, the multiprocessing module has a nice interface for ...READ MORE

answered Dec 15, 2020 in Python by Roshni
• 10,480 points
107,696 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP