Answer:
// program in Python.
#library
import math
#function to find surface area of sphere
def surf_area_sphere(rad):
# calculate area and return it
return 4*math.pi*rad**2
#read the radius of sphere
rad=float(input("Enter the radius of sphere:"))
#call the function to find the Surface area
s_area=surf_area_sphere(rad)
#print the Surface area
print("Surface area is:",s_area)
Step-by-step explanation:
Read the radius of sphere from user and assign it to variable "rad".Then call the function surf_area_sphere() with parameter "rad".This function will calculate the surface area as "4*pi*r*r" and return it value.Then print the surface area of sphere.
Output:
Enter the radius of sphere:4
Surface area is: 201.06192982974676