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

7th Oct 2019, 9:57 PM
Eleonora
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
7th Oct 2019, 11:59 PM
m8riix
m8riix - avatar
+ 2
Use the import math library
8th Oct 2019, 3:24 PM
Hamza Mohammad Khan
Hamza Mohammad Khan - avatar
+ 1
Have you tried to do by yourself?
7th Oct 2019, 10:23 PM
A͢J
A͢J - avatar
+ 1
scr4pp3r You did good but he/she should try first to learn coding
8th Oct 2019, 12:25 AM
A͢J
A͢J - avatar
0
AJ/AY got it bro 👍🏻
8th Oct 2019, 7:33 AM
m8riix
m8riix - avatar
0
Thank you so much for your help Yes, I tried to do it on my own ,but keep given me error
8th Oct 2019, 9:36 AM
Eleonora
0
Thanks👍🏼
8th Oct 2019, 12:12 PM
Eleonora
- 2
Area=pi*r**2 or area=pi*r^2 You can use anyone of them
8th Oct 2019, 10:25 AM
Pushpendra Singh
Pushpendra Singh - avatar