2.1k views
4 votes
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("\\ The Surface area of a Sphere = %.2f" %sa)
print("\\ The Volume of a Sphere = %.2f" %Volume)

Area_of_Triangle(6)

User Mdot
by
7.8k points

1 Answer

7 votes

Answer:

This looks great so far!

Step-by-step explanation:

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

User Akrsmv
by
8.7k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.