Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a function named concentric that uses turtle graphics to draw a concentric

ID: 3790746 • Letter: W

Question

Write a function named concentric that uses turtle graphics to draw a concentric (same center) circle of specified radius. The function concentric takes two parameters: 1. t, a turtle that is used to draw the circle. The turtle t may be in any position, orientation and up/down state. 2. radius, a positive integer that is the radius of the circle to draw The function concentric should: 1. draw a circle whose center is the initial position of t 2. leave t in its initial position and orientation when it returns

Python use circle method

thank you

Explanation / Answer

import turtle

def concentric(t, radius):
pos = t.position()
t.right(90) # Face South
t.forward(radius) # Move one radius
t.right(270) # Back to start heading
t.pendown()
t.circle(radius)
t.penup()
t.setposition(pos)

t=turtle.Turtle()
t.forward(100)
t.penup()
concentric(t, 30)
concentric(t, 20)
t.right(90)
t.forward(100)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote