0
Python maths
Hi there , I’m new I’m struggling with this one Anyone who can help me 🙏: Write a function that calculates the area of a circle Area=пr2
8 odpowiedzi
+ 2
here i create it for you
import math
def calcArea(radius):
return (math.pi)*(math.pow(radius,2))
print(calcArea(2))
#output - 12.56
+ 2
Use the import math library
+ 1
Have you tried to do by yourself?
+ 1
scr4pp3r You did good but he/she should try first to learn coding
0
AJ/AY got it bro 👍🏻
0
Thank you so much for your help
Yes, I tried to do it on my own ,but keep given me error
0
Thanks👍🏼
- 2
Area=pi*r**2 or area=pi*r^2
You can use anyone of them