python Implement a class SodaCan with methods getSurfaceArea() and

profileadelen
 (Not rated)
 (Not rated)
Chat

 

1.     Implement a class SodaCan with methods getSurfaceArea() and getVolume(). In the constructor, supply the height and radius of the can. 5 pts

Surface Area = (2* pi * radius * height) + (2 * pi * radius2)

Volume = pi * radius2 * height

Use the following to run your class:

can = SodaCan (2,4)

print("The volume of the can is", can.getVolume())

print("The surface area of the can is", can.getSurfaceArea())

a)    Your code with comments

b)    A screenshot of the execution

    • 7 years ago
    the python file attached
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      area.py