Calculate the area of circle | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Calculate the area of circle

22nd Sep 2021, 1:44 PM
Wolfer Vijay
Wolfer Vijay - avatar
3 Respostas
+ 3
1. Using math library import.math 2. Ask user to input circle radius 3. Now u can use area of circle formula Area of Circle = Ļ€ * R * R.
22nd Sep 2021, 1:49 PM
Pariket Thakur
Pariket Thakur - avatar
0
Firstly, you must know the formula : Area of Circle = Ļ€Ć—rĀ² or Ļ€Ć—rƗr *r means radius of the circle * Ļ€ (pi) = 3.1426 There are 2 ways to calculate the area of circle in python: #No. 1: print(3.1416*(float(input()))**2) #No. 2 (Recommended): from math import pi print(pi*(float(input()))**2)
22nd Sep 2021, 4:18 PM
Fź«€ā²…įƒ«į„†ĶŸį„™į„‰įƽ
Fź«€ā²…įƒ«į„†ĶŸį„™į„‰įƽ - avatar
0
from math import * def circle_area(): r=int(input("Enter radius of circle")) area = pi*r**2 print (area) circle_area()
23rd Sep 2021, 9:30 PM
šŸŒ¼FaithšŸŒ¼
šŸŒ¼FaithšŸŒ¼ - avatar