Circle
Write a program that receives the radius of the circle and prints its area and environment
Circle area = radius * radius * Pi (3.14)
Circle environment = diameter (radius * 2) * Pi number (3.14)
Write a program that receives the radius of the circle and prints its area and environment
Circle area = radius * radius * Pi (3.14)
Circle environment = diameter (radius * 2) * Pi number (3.14)
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
1PI=3.14
2r=float(input ('r: '))
3p=(r *r*PI)
4s=(2*r*PI)
5print(p,'m^2',s,'m')
# Circuit account code
a = int(input('شعاع را وارد کنید : '))
PI = 3.14
masahat = a * a * PI
mohit = a * 2 * PI
print('masahat :', masahat)
print('mohit :',mohit)
r = float(input("Enter a number for shoa: ")) print('masahat = ',r * r * 3.14,' and mohit = ',2 * r * 3.14)
R = eval(input("plesse inter R : ")) print(f"A : {R*R*3.14}") print(f"{2*R*3.14}")
from math import pi radius = float(input('Enter Radius:')) print(f'area: {(radius * radius * pi): .2f} - circumference: {(radius * 2 * pi): .2f}')
r = float(input("shoa:"))
print ("masahat :", (r*r*3.14) )
print ("mohit :", (r*2*3.14))
pi = 3.14 # Get the circle radius of the user radius = float(input("لطفاً شعاع دایره را وارد کنید: ")) # Calculate the area of the circle area = radius * radius * pi # Calculate the circle environment circumference = (radius * 2) * pi # Circle printing print("مساحت دایره برابر است با:", area) print("محیط دایره برابر است با:", circumference)
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.