
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Find the Area of a Circle in Python
In this article, we will learn about the solution and approach to solve the given problem statement.
Problem statement −Given the radius of a circle, we need to find a circle.
The area of a circle can simply be evaluated using the following formula.
Area = Pi*r*r
Let’s see the implementation below −
Example
def findArea(r): PI = 3.142 return PI * (r*r); # Driver method print("Area is %.6f" % findArea(5));
Output
Area is 78.550000
All variables and functions are declared in the global scope as shown in the figure below.
Conclusion
In this article, we learned about the approach to find whether it is possible to make a divisible by 3 numbers using all digits in an array.
Advertisements