Question

Write a code that uses turtle graphics to draw four concentric circles of radius 50, 100,...

Write a code that uses turtle graphics to draw four concentric circles of radius 50, 100, 150 and 200.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The code that uses turtle graphics to draw four concentric circles of radius 50, 100, 150 and 200 is as follows :

Code :

import turtle

# Function to draw circle
def drawCircle(radius,pos):
    x = turtle.Turtle()
    x.penup()
    x.goto(0,pos)         # turtle moves to coordinate (0,pos)
    x.pendown()
    x.circle(radius)      # draws the circle of given radius

drawCircle(50,0)
drawCircle(100,-50)
drawCircle(150,-100)
drawCircle(200,-150)
turtle.done()

turtle.getscreen()._root.mainloop()

Output :

b crawler]-.crawler.py PyCharm Community Edition 2016.2.3 File Edit View Navigate Code Refactor Run Iools VC Window Help web

Add a comment
Know the answer?
Add Answer to:
Write a code that uses turtle graphics to draw four concentric circles of radius 50, 100,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT