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
  • Must be done in python. This will be connected to other turtle assignments. Might need a...

    Must be done in python. This will be connected to other turtle assignments. Might need a sleep at end. Swimming in a Pond In this function, you will draw a small pond and have the turtle first take a nice walk around it and then jump in. The pond will need to be drawn in the upper left quandrant of your screen. This function needs to do the following: Contain two parameters to denote the color of the path (pen...

  • Use Python 3 Create a program that uses Turtle to draw shapes. Show the following menu:...

    Use Python 3 Create a program that uses Turtle to draw shapes. Show the following menu: Enter Circle Enter Rectangle Remove Shape Draw Shapes Exit Circles – User inputs position, radius, and color. The position is the CENTER of the circle Rectangles – User inputs position, height, width, color. The position is the lower left-hand corner Colors – Allow red, yellow, blue, and green only Remove – Show the number of items in the list and let the user enter...

  • Turtle Graphics with nested loop: Write a turtle graphics python program repeat_squares.py that uses nested loops...

    Turtle Graphics with nested loop: Write a turtle graphics python program repeat_squares.py that uses nested loops to draw 100 squares, to create this design: Turtle-squares.png starting with the smallest square in the bottom right-hand corner. Start at position (-4,4). At each step increase the length of each side by 4 pixels. Draw 100 squares. Please submit with an animation speed of 0 and the turtle hidden turtle.hideturtle()

  • 18. Turtle Graphics: Hypnotic Pattern Use a loop with the turtle graphics library to draw the...

    18. Turtle Graphics: Hypnotic Pattern Use a loop with the turtle graphics library to draw the design shown in Figure 4-15 On Python code with Turtle 18. Turtle Graphics: Hypnotic Pattern use a loop with the turtle graphics library to draw the design shown in Figure 4-15 Use a loop with the turtle graphics library to draw the design shown in Figure 4-140. Figure 4-14 Star pattern 18. Turtle Graphics: Hypnotic Pattern Use a loop with the turtle graphics library...

  • Python Question Task 4 Create a function named poker_table that uses Turtle Graphics to create a...

    Python Question Task 4 Create a function named poker_table that uses Turtle Graphics to create a single poker table to accommodate all players. There should be four parameters: num_players indicates the number of players; side_length indicates the length in pixels of each side of the table; and x and y, which give the location where you should start drawing the table. The poker table should be a simple regular polygon (that is, with sides of equal length). The number of...

  • 1. Use Turtle Graphics to create a tic tac toe grid in Python. Write a Python...

    1. Use Turtle Graphics to create a tic tac toe grid in Python. Write a Python program that prints a tic tac toe grid. Use Turtle Graphics to create the graphic.

  • Please use python language to solve this problem. 3. Use turtle graphics to draw a spiral...

    Please use python language to solve this problem. 3. Use turtle graphics to draw a spiral as below. It does not have to look exactly like the one below, but it should be a path that spirals around a point many times. Upload a file called spiral py. When we run it using the python command it should draw the picture without any further modification. Hint: use a for or while loop Figure 3: spiral

  • 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.

  • Challenge: Recursion and Python Turtle Graphics Submit Assignment Due Friday by 11:59pm Points 100 Submitting a...

    Challenge: Recursion and Python Turtle Graphics Submit Assignment Due Friday by 11:59pm Points 100 Submitting a file upload Available after Nov 9 at 12am Challenge: Recursion and Python Turtle Graphics Description: Write a program that draws a picture using Python e, recursion, and Turtle graphics e. Purpose: The purpose of this challenge is to provide experience working with recursione in Pythone. It also provides experience working with Turtle graphics in Pythone Requirements: Recursion and Python Turtle Graphics provides information on...

  • Please help: For this project, you will create a shape drawing program using Turtle graphics. Your...

    Please help: For this project, you will create a shape drawing program using Turtle graphics. Your program will begin by asking the user how many points they would like to enter (# of vertices for the shape). Next, you will use a loop to input each X and Y coordinate and store these coordinates in lists. After inputting all of the coordinates, create a second loop that will draw and fill the shape using the coordinates that were entered. All...

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