Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified __pycache__/instructor.cpython-38.pyc
Binary file not shown.
Binary file added __pycache__/nssperson.cpython-38.pyc
Binary file not shown.
Binary file modified __pycache__/student.cpython-38.pyc
Binary file not shown.
8 changes: 5 additions & 3 deletions instructor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class Instructor:
from nssperson import NSSPerson


class Instructor(NSSPerson):

def __init__(self, name, slack, cohort, specialty):
super().__init__(slack, cohort)
self.name = name
self.slack = slack
self.cohort = cohort
self.specialty = specialty

def add_exercises(self, student, exercises):
Expand Down
13 changes: 9 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@
# Chapt 14 challenge


def newStr(student):
for exercise in Ashley.exercises:
print(f"{student.first_name} is working on {exercise.name} ")
def challenge_str(student):
# for exercise in student.exercises:

print(
f"{student.first_name} is working on {student.exercises[0].name} and {student.exercises[1].name}")

newStr(Eve)

challenge_str(Eve)
challenge_str(Jimmy)
challenge_str(Ashley)
challenge_str(Brian)
4 changes: 4 additions & 0 deletions nssperson.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class NSSPerson():
def __init__(self, slack, cohort):
self.slack = slack
self.cohort = cohort
8 changes: 5 additions & 3 deletions student.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
class Student:
from nssperson import NSSPerson


class Student(NSSPerson):

def __init__(self, first_name, last_name, slack, cohort):
super().__init__(slack, cohort)
self.first_name = first_name
self.last_name = last_name
self.slack = slack
self.cohort = cohort
self.exercises = list()