import turtle # Create a turtle object t = turtle.Turtle() # Set the turtle's speed t.speed(0) # Set the radius radius = 100 # Set the angle for the part of the circle angle = 90 # Move the turtle to the starting point t.penup() t.setx(-radius) t.pendown() # Draw the part circle t.circle(radius, angle) # Close the turtle window turtle.done()
import numpy as np import matplotlib.pyplot as plt # Set the radius radius = 1 # Set the angle for the part of the circle theta = np.linspace(0, np.pi/2, 100) # Calculate the x and y coordinates for the part circle x = radius * np.cos(theta) y = radius * np.sin(theta) # Plot the part circle plt.plot(x,y) # Set the axis limits plt.xlim(-radius - 0.1, radius + 0.1) plt.ylim(0, radius + 0.1) # Set the axis labels plt.xlabel('x-axis') plt.ylabel('y-axis') # Show the plot plt.show()In example 1, we used the turtle package library to draw a part circle by creating a turtle object and setting the radius and angle for the part of the circle. We then used the `circle()` method to draw the part circle. In example 2, we used the matplotlib package library to create a part circle by setting the radius and angle for the part of the circle and calculating the x and y coordinates using NumPy. We then plotted the part circle using the `plot()` method and set the axis limits and labels using the `xlim()`, `ylim()`, `xlabel()`, and `ylabel()` methods.