
# THis is a Python program to determine the focal length of a spherical mirrorr  
  
# Determines focal length of  
# a spherical concave mirror 
def focal_length_concave(R): 
    return R / 2
  
# Determines focal length of 
# a 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")
