Answers for "draw a circle python"

1

python draw circle matplotlib

import matplotlib.pyplot as plt
R = 1
max_theta = 2* np.pi
list_t = list(np.arange(0,max_theta,0.0001))
x_circle = [(R*math.cos(x_y)) for x_y  in list_t]
y_circle = [(R*math.sin(x_y)) for x_y  in list_t]
#Plot
fig = plt.figure()
fig.set_size_inches(8, 8)
ax = fig.add_axes([0.15,0.2,0.7,0.7]) 
ax.plot(x_circle, y_circle, linestyle = 'solid', color = 'black')
Posted by: Guest on April-30-2021
4

circle python programe

#Area and circumference of a circle.
r=float(input('Enter the radius of the circle :'))
pi=22/7
area=pi*r**2
circumference=2*pi*r
print('The area of the circle is',area)
print('The circumference of the circle is',circumference)
_______________________________________________________________________________
Posted by: Guest on November-30-2021
1

python how to draw a circle

import turtle
turtle.circle(150)
Posted by: Guest on December-31-2020

Python Answers by Framework

Browse Popular Code Answers by Language