Question

Python Question : Using turtle library design a programm with turtles moving concurrently

Python Question : Using turtle library design a programm with turtles moving concurrently

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import turtle

def drawPolygon(t, sideLength, numSides):
turnAngle = 360 / numSides
for i in range(numSides):
t.forward(sideLength)
t.right(turnAngle)

def drawCircle(anyTurtle, radius):
circumference = 2 * 3.1415 * radius
sideLength = circumference / 360
drawPolygon(anyTurtle, sideLength, 360)


wn = turtle.Screen()
wheel = turtle.Turtle()
wheel2 = turtle.Turtle()
drawCircle(wheel, 20)
drawCircle(wheel2, 30)

wn.exitonclick()

Hope it solves your query. If any doubt do drop a comment. Please Upvote if it helped

Add a comment
Know the answer?
Add Answer to:
Python Question : Using turtle library design a programm with turtles moving concurrently
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