Create a class called
Studentwith instance attributes:
Age. The user can input the
age. Add 2 methods to the class: a
raiseHandmethod, which prints out the student's name followed by "is now raising their hand" and a
growOldermethod that makes the student older by 1 year.
Create a class called Teacher. Add 3 variables to this class:
Age, and a list of
Studentclasses from the previous problem (the list can just be called
students). The user can input these 3 variables. Add 2 methods to the class: a
displayClassmethod that prints out the names of all the students, and a
graduatemethod that increments the age of all of his/her students by 1 and prints out all the ages
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact email@example.com for inquiries.