Ahmed Blogs
Python code for Circle
import math
import matplotlib.pyplot as plt
# Define the radius of the circle
radius = 5
# Calculate diameter
diameter = 2 * radius
# Calculate circumference
circumference = 2 * math.pi * radius
# Calculate area
area = math.pi * radius**2
# Print the results
print(f"Radius: {radius} m")
print(f"Diameter: {diameter} m")
print(f"Circumference: {circumference} m")
print(f"Area: {area} sq m")
# Create a circle plot
circle = plt.Circle((0, 0), radius, color='blue', fill=False)
fig, ax = plt.subplots()
ax.add_artist(circle)
ax.set_aspect('equal', adjustable='datalim')
plt.xlim(-10, 10)
plt.ylim(-10, 10)
plt.gca().set_aspect('equal', adjustable='box')
plt.title("Circle with radius 5 m")
plt.grid()
plt.show()
07/26/2023
Three chief engineers in one frame. A great moment of adda.
07/16/2023
Good Day everyone! I’m in my Hometown Tangail, BD
Click here to claim your Sponsored Listing.
Category
Contact the public figure
Telephone
Website
Address
Sleepy Hollow Drive
Allen, TX
75002