Ask questions, share knowledge, and connect with a vibrant community on IDNLearn.com. Join our community to access reliable and comprehensive responses to your questions from experienced professionals.

PYTHON CODING QUESTION

I'm working on an assignment for my programming class and I have to find the surface area and volume of a sphere from a tuple

Here's what I have so far:

# Python Program to find Volume and Surface Area of Sphere using Functions

import math

list1 = [1,1.5,1]
tuple1 = tuple(list1)

def Area_of_Triangle(radius):
sa = 4 * math.pi * radius * radius
Volume = (4 / 3) * math.pi * radius * radius * radius
print("\n The Surface area of a Sphere = %.2f" %sa)
print("\n The Volume of a Sphere = %.2f" %Volume)

Area_of_Triangle(6)


Sagot :

Answer:

This looks great so far!

Explanation:

Great job on the code, keep up the amazing work!

We appreciate your contributions to this forum. Don't forget to check back for the latest answers. Keep asking, answering, and sharing useful information. Your search for answers ends at IDNLearn.com. Thank you for visiting, and we hope to assist you again soon.