TORONTO KIDS COMPUTER CLUB | Tuesday 17:00 Python Practice – 22.05.17.
20654
post-template-default,single,single-post,postid-20654,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Tuesday 17:00 Python Practice – 22.05.17.

21 May Tuesday 17:00 Python Practice – 22.05.17.

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.