The following example code demonstrates how to Compute the Area of a Circle Using Python.
# programmingempire.com
# Compute Area of a circle
# radius = 10
# area = 3.14 *radius * radius
# print("The area for the circle of radis", radius, "is", area)
# radius = 10
# PI=3.14
# area = PI *radius * radius
# print("The area for the circle of radis", radius, "is", area)
# radius = int(input("Enter a value for radius:"))
# PI=3.14
# area = PI *radius * radius
# print("The area for the circle of radis", radius, "is", area)
import math
radius = int(input("Enter a value for radius:"))
# PI=3.14
if radius >=0:
area = math.pi*radius * radius
print("The area for the circle of radis", radius, "is", area)
else:
print("Invalid Input")
Output

Further Reading
Examples of OpenCV Library in Python
A Brief Introduction of Pandas Library in Python
A Brief Tutorial on NumPy in Python
- Angular
- ASP.NET
- C
- C#
- C++
- CSS
- Dot Net Framework
- HTML
- IoT
- Java
- JavaScript
- Kotlin
- PHP
- Power Bi
- Python
- Scratch 3.0
- TypeScript
- VB.NET
