{"id":23001,"date":"2021-09-29T20:13:13","date_gmt":"2021-09-29T14:43:13","guid":{"rendered":"https:\/\/python-programs.com\/?p=23001"},"modified":"2021-11-22T18:35:37","modified_gmt":"2021-11-22T13:05:37","slug":"python-program-to-calculate-volume-and-surface-area-of-hemisphere","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-calculate-volume-and-surface-area-of-hemisphere\/","title":{"rendered":"Python Program to Calculate Volume and Surface Area of Hemisphere"},"content":{"rendered":"
In the previous article, we have discussed Python Program to Calculate Volume of Dodecahedron<\/a> Hemisphere:<\/strong><\/p>\n It is the precise half of a sphere in geometry. Many real-life examples of hemispheres may be found, such as our planet Earth, which is divided into two hemispheres, the southern and northern hemispheres.<\/p>\n Examples:<\/strong><\/p>\n Example1:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Example2:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n The Surface Area of the Hemisphere with radius { 8 } is = 402.1238596594935 Below are the ways to Calculate the Volume and Surface Area of the Hemisphere in Python.<\/p>\n surface area of the Hemisphere = <\/b> Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Grab the opportunity and utilize the Python Program Code Examples<\/a> over here to prepare basic and advanced topics too with ease and clear all your doubts.<\/p>\n In the previous article, we have discussed Python Program to Calculate Volume of Dodecahedron Given the radius value of the hemisphere, the task is to find the Volume and Surface Area of the given Hemisphere in Python. Hemisphere: It is the precise half of a sphere in geometry. Many real-life examples of hemispheres may be …<\/p>\n
\nGiven the radius value of the hemisphere, the task is to find the Volume and Surface Area of the given Hemisphere in Python.<\/p>\nGiven Radius of Hemisphere = 7<\/pre>\n
The Surface Area of the Hemisphere with radius { 7 } is = 307.8760800517997\r\nThe Volume of the Hemisphere with radius { 7 } is = 718.377520120866<\/pre>\n
Given Radius of Hemisphere = 8<\/pre>\n
\nThe Volume of the Hemisphere with radius { 8 } is = 1072.330292425316<\/p>\nProgram to Calculate Volume and Surface Area of Hemisphere<\/h2>\n
\n
\nvolume of the Hemisphere = <\/b><\/p><\/blockquote>\nMethod #1: Using Mathematical Formula (Static Input)<\/h3>\n
\n
# Import the math module using the math keyword.\r\nimport math\r\n# Give the radius of the hemisphere as static input and store it in a variable.\r\nradiusHemi = 7\r\n# We can get the pi value using the pi() function.\r\n# We can Calculate the power using the pow() function\r\n# Calculate the surface area of the hemisphere with the given radius\r\n# using the above given mathematical formula\r\n# and functions and store the result in some variable say hemiArea.\r\nhemiArea = 2 * math.pi * math.pow(radiusHemi, 2)\r\n# Calculate the volume of the hemisphere with the given radius\r\n# using the above given mathematical formula\r\n# and functions and store the result in some variable say hemiVolume.\r\nhemiVolume = 2 * math.pi * math.pow(radiusHemi, 3) \/ 3\r\n# Print the hemiArea to get the Surface Area of the given hemisphere.\r\nprint(\r\n 'The Surface Area of the Hemisphere with radius {', radiusHemi, '} is =', hemiArea)\r\n# Print the hemiVolume to get the Volume of the given hemisphere.\r\nprint(\r\n 'The Volume of the Hemisphere with radius {', radiusHemi, '} is =', hemiVolume)\r\n<\/pre>\n
The Surface Area of the Hemisphere with radius { 7 } is = 307.8760800517997\r\nThe Volume of the Hemisphere with radius { 7 } is = 718.377520120866<\/pre>\n
Method #2: Using Mathematical Formula (User Input)<\/h3>\n
\n
# Import the math module using the math keyword.\r\nimport math\r\n# Give the radius of the hemisphere as user input using the int(input()) function\r\n# and store it in a variable.\r\nradiusHemi = int(input('Enter some random radius of the Hemisphere = '))\r\n# We can get the pi value using the pi() function.\r\n# We can Calculate the power using the pow() function\r\n# Calculate the surface area of the hemisphere with the given radius\r\n# using the above given mathematical formula\r\n# and functions and store the result in some variable say hemiArea.\r\nhemiArea = 2 * math.pi * math.pow(radiusHemi, 2)\r\n# Calculate the volume of the hemisphere with the given radius\r\n# using the above given mathematical formula\r\n# and functions and store the result in some variable say hemiVolume.\r\nhemiVolume = 2 * math.pi * math.pow(radiusHemi, 3) \/ 3\r\n# Print the hemiArea to get the Surface Area of the given hemisphere.\r\nprint(\r\n 'The Surface Area of the Hemisphere with radius {', radiusHemi, '} is =', hemiArea)\r\n# Print the hemiVolume to get the Volume of the given hemisphere.\r\nprint(\r\n 'The Volume of the Hemisphere with radius {', radiusHemi, '} is =', hemiVolume)\r\n<\/pre>\n
Enter some random radius of the Hemisphere = 8\r\nThe Surface Area of the Hemisphere with radius { 8 } is = 402.1238596594935\r\nThe Volume of the Hemisphere with radius { 8 } is = 1072.330292425316<\/pre>\n
\n