human
Program to determine focal length of a spherical mirror | Determines focal length of a spherical concave mirror.
Determines focal length of a spherical convex mirror.
Driver function"
Solution in Python:
 Write me a code to program to determine focal length of a spherical mirror and the other steps required?
assistant
#Here is code to program to determine focal length of a spherical mirror and the other steps required.
 def focal_length_concave ( R ) :
	return R / 2
def focal_length_convex ( R ) :
	return - ( R / 2 )
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 " )