Area of Circle in Python

Description

Python program to get radius of circle and find area of circle.
Sample Input 1:
4
Sample Output 1:
50.24

Solution

r=int(input("Enter the radius:"))
area=3.14*r*r
print("area: {}".format(area))

Explanation

get th radius of a circle using input() method
calculate area = pi * r * r



Interesting Pattern Programs: for more Patterns

Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution
Input:
5
Output:
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *Solution
Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution
Input:
5
Output:
*********
 *******
  *****
   ***
    *
   ***
  *****
 *******
*********Solution