- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- 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

In this article, we will learn about the solution to the problem statement given below −

We will be given the radius of curvature of the spherical mirror and we have to find the focal length of the same.

The focal length is the distance between the centre of curvature of the mirror to the principal foci . In order to determine the focal length of a spherical mirror firstly, we should know the radius of curvature of that mirror. The distance from the vertex of the mirror to the centre of curvature is called the radius of curvature.

Mathematically −

**For concave mirror:** F = R/2

**For convex mirror:** F = -R/2

Now let’s see the implementation

#spherical concave mirror def focal_length_concave(R): return R / 2 # spherical convex mirror def focal_length_convex(R): return - ( R/ 2 ) # Driver function R = 30 print("Focal length of spherical concave mirror is :", focal_length_concave(R)," units") print("Focal length of spherical convex mirror is : ", focal_length_convex(R)," units")

Focal length of spherical concave mirror is: 15.0 units Focal length of spherical convex mirror is: -15.0 units

The Outputs can be in metre, centimetre or millimetre. For generalized result units is mentioned in place of any specific unit type.

All the variables are declared in the global frame with two functions as shown in the image below.

In this article, we learnt about how we can calculate the focal length of a spherical mirror.

- Related Questions & Answers
- Python Program for the focal length of a spherical mirror
- Java Program for focal length of a spherical mirror
- C Program for focal length of a lens
- Python Program to find mirror characters in a string
- Python Program to Create a Mirror Copy of a Tree and Display using BFS Traversal
- Sort a list according to the Length of the Elements in Python program
- Python Program to Find the Length of a List Using Recursion
- Python program to sort a List according to the Length of the Elements?
- Python Program that prints the rows of a given length from a matrix
- Create a mirror tree from the given binary tree in C++ Program
- Program to find out the greatest subarray of a given length in python
- Program to find length of a list without using built-in length() function in Python
- Program to find minimum length of lossy Run-Length Encoding in Python
- Python Program to Calculate the Length of a String Without Using a Library Function
- C++ Program to Find the Length of a String

Advertisements