Changes

Jump to: navigation, search

OPS435 Python3 Lab 6

1 byte removed, 21:55, 3 November 2019
LAB REVIEW
# What is self used for in an object?
# What does it mean to instantiate an object?
# Import the Student class into ipython3python3, instantiate some objects, and try changing different attributes, and adding new attributes.
# Make a copy of lab6a.py called lab6practice.py, make the Student class accept another argument called program. When you create the new object: student = Student('name', '123456789', 'CTY'). Can you print the new students program out with student.program?
# Create a new method in lab6practice.py that checks to make sure the program is either "CTY" or "CNS", if it's not one of these, change the value to "unknown". Make sure the attribute is changed after your object is created.
1,760
edits

Navigation menu