Question

Use a function in python that uses turtle graphics to draw a circle. Allow inputs of...

Use a function in python that uses turtle graphics to draw a circle. Allow inputs of where to start (x,y) the radius, the pen color and fill color.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

python 3.6 code:

import turtle

print("Enter the start position start(x,,y) ")

a=[int(x) for x in input().split()]

x=a[0]

y=a[1]

r=int(input("Enter the radius"))

pc=input("Enter the pen color")

fc=input("Enter the fill color")

sc=turtle.Screen()

sc.bgcolor("black")

t=turtle.Turtle()

t.pensize(10)

t.setposition(x,y)

t.color(pc)

t.begin_fill()

t.fillcolor(fc)

t.circle(r)

t.end_fill()

Execution screenshots:

Note: please like the answer if you are satisfied with it. Thank you in advance.

Add a comment
Know the answer?
Add Answer to:
Use a function in python that uses turtle graphics to draw a circle. Allow inputs of...
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