CodeSolved

Solved Programming Questions & Exercises

The calculation of the volume and area of the butter

Practice Easy 348/ Download 2219 Views

Write a program that receives Qatar and prints the volume and area of Korea.

Korean volume formula = radius with power of 3 x pcs X four -thirds (3/3).

Korean area formula = radius to 2 x pcs X four (4)

12 Answers

This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
gh=float(input("gh:"))
sho=(gh/2)
hag=(sho**3)*(3.14)*(4/3)
ma=(sho**2)*(3.14)*4
print(hag)
print(ma)
def kore():
    """
    تابع حجم و مساحت کره را محاسبه میکند
    """
    radius = int(input("please enter the radius :")) # Getting the radius
    volume = (radius**3) * (3.14) * (4/3) # Volume calculation
    area = (radius**2) * (3.14) * (4) # Calculate area
    return f"hajm : {volume:.2f}\nmasahat : {area:.2f}" # Save the volume and area of 2 decimal places
print(kore()) # Farakhani
ghotr = float(input("lotfan andazeye ghotr ra bar hasb cm vared konid: "))
print("hajme kore = ", ((ghotr/2)**3) * 3.14 * 3/4, "cm**3")
print("masahate kore = ", ((ghotr/2)**2) * 3.14 * 4, "cm**2" )
a=float(input("enter the ghoter:"))
b=a/2
hajm=(b**3)*(3.14)*(3/4)
masahat=(b**2)*(3.14)*4
print(hajm,"hajm")
print(masahat,"masahat")
Roghaye.m Download Python
g=float(input('gotr:'))
f=g/2
hajm=(f*f*f)*3.14*3/4
masahat=(f*f)*3.14*4
print('hajme kore:',hajm,'masahate kore:',masahat)
Maryam.n Download Python
def kore(r):
    hajm = 0.75 * 3.14 * (r**3)
    masahat = 4 * 3.14 * (r**2)
    return hajm,masahat
print(kore(r=int(input("enter your number:"))))
                    
Sumy.amiri Download Python
def kore(r):
    pi = 3.14
    x = pow(r,3)
    y = pow(r,2)
    hajm = 4/3 * pi * x
    masahat = 4 * pi * y
    return f"hajm kore: {hajm} , masahat koreh: {masahat}"
print(kore(r=int(input("enter your number:"))))
Sumy.amiri Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close