TORONTO KIDS COMPUTER CLUB | Tuesday Python Homework 18:30 – 22.01.11.
20222
post-template-default,single,single-post,postid-20222,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Tuesday Python Homework 18:30 – 22.01.11.

16 Jan Tuesday Python Homework 18:30 – 22.01.11.

Question:

  1. Create a Python class Person with attributes: name and age of type string.
  2. Create a display() method that displays the name and age of an object created via the Person class.
  3. Create a child class Student which inherits from the Person class and which also has a section attribute.
  4. Create a method displayStudent() that displays the name, age and section of an object created via the Student class.
  5. Create a student object via an instantiation on the Student class and then test the displayStudent method.
No Comments

Sorry, the comment form is closed at this time.