TORONTO KIDS COMPUTER CLUB | Monday 17:30 Python Practice – 23.01.09.
21619
post-template-default,single,single-post,postid-21619,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Monday 17:30 Python Practice – 23.01.09.

14 Jan Monday 17:30 Python Practice – 23.01.09.

Question:

  1. Write a Rectangle class in Python language, allowing you to build a rectangle with length and width attributes.
  2. Create a Perimeter() method to calculate the perimeter of the rectangle and a Area() method to calculate the area of ​​the rectangle.
  3. Create a method display() that display the length, width, perimeter and area of an object created using an instantiation on rectangle class.
  4. Create a Cuboid child class inheriting from the Rectangle class and with a height attribute and another Volume() method to calculate the volume of the Cuboid.
No Comments

Sorry, the comment form is closed at this time.