Changes

Jump to: navigation, search

OPS435 Python Lab 6

134 bytes removed, 23:03, 25 February 2018
PART 1 - Creating a Class
== PART 1 - Creating a Class ==
:The Each object of a class that is written we write in Python can contain variables, functions, code, but none of the code is executed or run until the class is used to create the an object. Remember that the class is a blueprint for how your object will work, the object that will be created is what will actually be running the code. This part of a class works in the same way as a function definition, the function doesn't run until it's executed, code inside classes dondoesn't run until the are made into objects.
:'''Perform the Following Steps:'''
:#Launch your Centos VM, open a shell terminal (as a regular user) and start a new ipython3 session:<source lang="python">ipython3</source>:#Create a new python script in the lab6 directory:<source lang="pythonbash">%cd ~/ops435/lab6%vim ~/ops435/lab6/student.py
</source>
:#Place the following content inside the new python script and save it. Read through this script and the comments inside.<source lang="python">

Navigation menu