TORONTO KIDS COMPUTER CLUB | PMCA Sunday 10:00 Practice -22.
18391
post-template-default,single,single-post,postid-18391,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

PMCA Sunday 10:00 Practice -22.

01 Oct PMCA Sunday 10:00 Practice -22.

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.