Write a Python program that calculates the area and the circumferenceof a circle whose radius is described by the equation:r=√(x−h)2+(y−k)2+(z−m)2-------------------(1)Your code must have a main( ) and a getValues(center, point) functions.1.The main function reads data from an input file, which has theformat shown below. Each line in the file starts with a serialnumber followed by h, k, m, x, y, and then z (see Fig. 1). 2.For each sphere, the function getValues(center, point) receivestwo lists center (containing h,k, and m) and point (containing x,y, and z). Then it returns a list containing the radius, surfacearea and volume of the sphere use Equation 2 and 3 below. area=4πr2----------------------------(2)volume=43πr3----------------(3)3.This list is received by the main function and it is written it in an output file.4.In addition to that, your main function will count how many spheres have a surface areas less than 200 units2.Note: You program must be general and works for any number of experiments. All reading and writing must be done in the main function. Sample input file below: (you can copy/paste and save below data as text file for input)1 9.07 4.09 4.84 5 7.19 3.42 2 5.585.519.341.028.611.4236.773.771.58.173.244.742.192.837.095.855.737.9555.860.189.163.912.69.11 Sample output file below:SnrAreaVolume15.31354.32627.1529.651170.213764.1833.53156.59184.2544.75283.53448.9253.11121.54126Number of circles with surface area less than 200 units sq = 3
Write a Python program that calculates the area and the circumferenceof a circle whose radius is described by the equation:r=√(x−h)2+(y−k)2+(z−m)2-------------------(1)Your code must have a main( ) and a getValues(center, point) functions.1.The main function reads data from an input file, which has theformat shown below. Each line in the file starts with a serialnumber followed by h, k, m, x, y, and then z (see Fig. 1). 2.For each sphere, the function getValues(center, point) receivestwo lists center (containing h,k, and m) and point (containing x,y, and z). Then it returns a list containing the radius, surfacearea and volume of the sphere use Equation 2 and 3 below. area=4πr2----------------------------(2)volume=43πr3----------------(3)3.This list is received by the main function and it is written it in an output file.4.In addition to that, your main function will count how many spheres have a surface areas less than 200 units2.Note: You program must be general and works for any number of experiments. All reading and writing must be done in the main function.
Sample input file below: (you can copy/paste and save below data as text file for input)1 9.07 4.09 4.84 5 7.19 3.42 2 5.585.519.341.028.611.4236.773.771.58.173.244.742.192.837.095.855.737.9555.860.189.163.912.69.11
Sample output file below:SnrAreaVolume15.31354.32627.1529.651170.213764.1833.53156.59184.2544.75283.53448.9253.11121.54126Number of circles with surface area less than 200 units sq = 3
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)