Computer Science, asked by cutewamikraza786, 5 months ago

write a python code to accept the redius of a cirle and calculate the are and perimeter of a circle​

Answers

Answered by juliepintu0gmailcom
0

Python: Area of a Circle

In geometry, the area enclosed by a circle of radius r is πr2. Here the Greek letter π represents a constant, approximately equal to 3.14159, which is equal to the ratio of the circumference of any circle to its diameter.

Python: Area of a circle

Sample Solution:-

Python Code:

from math import pi

r = float(input ("Input the radius of the circle : "))

print ("The area of the

Answered by SrijanShrivastava
0

 \bf  \underline {CODE}

  \sf \green {import} \: math

 \sf R \pink{=}  \green{eval}(\green{input}( \red{"Enter \: the \: radius \:   : \: " }))

 \sf \green{print}(\red{"The \:  Perimeter \:  of \:  circle  \: is   \:   : "\:} ,\green{2} ^{*} (math.\blue{pi}) ^{* } R,\red{"units"})

 \sf \green{print}(\red{"The \:  Area \:  of \:  circle  \: is   \:   : "\:} ,(math.\blue{pi}) ^{*} R ^{ **}\green{2},\red{"sq \: units"})

 \\

 \bf \underline{OUTPUT}

 \sf Enter \:  the \:  radius  \: :  \:24

 \sf The \:  Perimeter \:  of \:  circle  \: is  \:  :  \: 150.79644737231007 \: units

 \sf The \:  Area \:  of \:  circle  \: is  \:  :  \: 1809.5573684677208 \: sq \: units

Similar questions