9. Write a class to represent spheres. Your class should implement the fol- lowing methods: init (self, radius) Creates a sphere having the given radius. getRadius (self) Returns the radius of this...

10 Python
9. Write a class to represent spheres. Your class should implement the fol-<br>lowing methods:<br>init (self, radius) Creates a sphere having the given radius.<br>getRadius (self) Returns the radius of this sphere.<br>surfaceArea(self) Returns the surface area of the sphere.<br>1<br>volume (self) Returns the volume of the sphere.<br>Use your new class to solve Programming Exercise 1 from Chapter 3.<br>10. Same as the previous problem, but for a cube. The constructor should<br>accept the length of a side as a parameter.<br>ny<br>DII<br>F5<br>F1<br>F2<br>F3<br>F4<br>F6<br>F7<br>$<br>&<br>4.<br>6.<br>W<br>E<br>R.<br>Y.<br>S<br>F<br>LL<br>#3<br>

Extracted text: 9. Write a class to represent spheres. Your class should implement the fol- lowing methods: init (self, radius) Creates a sphere having the given radius. getRadius (self) Returns the radius of this sphere. surfaceArea(self) Returns the surface area of the sphere. 1 volume (self) Returns the volume of the sphere. Use your new class to solve Programming Exercise 1 from Chapter 3. 10. Same as the previous problem, but for a cube. The constructor should accept the length of a side as a parameter. ny DII F5 F1 F2 F3 F4 F6 F7 $ & 4. 6. W E R. Y. S F LL #3

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here