Example #1
0
mac = Student("Mac", "Gibbons", "Mac Gibbons")
me = Student("Matthew", "Kroeger", "Matthew Kroeger")
coop = Student("Cooper", "Nichols", "Cooper Nichols")
frog = Student("Roxanne", "Nasraty", "Roxanne Nasraty")
students.extend([mac, me, coop, frog])

C37.assign_student(mac)
C38.assign_student(me)
C38.assign_student(coop)
C40.assign_student(frog)

steve = Instructor("Steve", "Brownlee", "coach", "Good Vibes")
jisie = Instructor("Jisie", "David", ":crown:", "Excitement")
bryan = Instructor("Bryan", "Nilsen", "Kickass High-Fiver", "High Fives")

C37.assign_instructor(steve)
C38.assign_instructor(jisie)
C40.assign_instructor(bryan)

steve.assign_exercise(mac, capstone)
steve.assign_exercise(mac, bank_account)
bryan.assign_exercise(frog, fizz_buzz)
bryan.assign_exercise(frog, capstone)

for student in C38.students:
    jisie.assign_exercise(student, minecraft)
    jisie.assign_exercise(student, snake)

for student in students:
    student_work = f"{student.first_name} {student.last_name} is working on "
    if len(student.exercises) > 1:
Example #2
0
# Create 4, or more, students and assign them to one of the cohorts.

samSam = Student("Sam", "Pita", "SamTheSlice")
guyGuy = Student("Guy", "Cherkesky", "WhatA")
erEr = Student("Erin", "Polley", "ErIn")
treyTrey = Student("Trey", "Suitor", "HesASuitor")

# Create 3, or more, instructors and assign them to one of the cohorts.

jisie = Instructor("Jisie", "David", "jDavid", "all-around-badass")
joe = Instructor("Joe", "Shepard", "jShep", "the jokes")
jenna = Instructor("Jenna", "Solis", "jSol", "cat babies")
andy = Instructor("Andy", "Smith", "andEE", "scuba diving")
steve = Instructor("Steve", "Jenkins", "@steve", "poetry")

cohort36.assign_instructor(jisie)
cohort36.assign_instructor(andy)
cohort35.assign_instructor(joe)
cohort36.assign_instructor(jenna)
cohort37.assign_instructor(steve)

cohort36.list_instructors()
cohort37.list_instructors()
cohort35.list_instructors()

# Have each instructor assign 2 exercises to each of the students.

jisie.assign_exercise(guyGuy, exercise1, exercise3)
jisie.assign_exercise(samSam, exercise4, exercise3)
joe.assign_exercise(erEr, exercise1, exercise2)
joe.assign_exercise(guyGuy, exercise1, exercise2)
Example #3
0
cohort_41 = Cohort('cohort 41')
cohort_42 = Cohort('cohort 42')

# Creating Students
ronnie = Student('Ronald', 'Lankford', 'ronnielankford', 'cohort 40')
geoff = Student('Geoff', 'Slater', 'mynamegeoff', 'cohort 41')
mark = Student('Mark', 'Kagoan', 'markymark', 'cohort 40')
shae = Student('Shae', 'Choate', 'shadeofshae', 'cohort 42')

# Creating Instructors
joe = Instructor('Joe', 'Shepherd', 'joe', 'dad jokes', 'cohort 40')
bry = Instructor('Bryan', 'Nilsen', 'bry', 'dad jokes', 'cohort 41')
madi = Instructor('Madi', 'Peper', 'madi', 'dad jokes', 'cohort 42')

# Assigning Instructors to Cohorts
cohort_40.assign_instructor(joe)
cohort_41.assign_instructor(bry)
cohort_42.assign_instructor(madi)

# Assigning Students to Cohorts
cohort_40.assign_student(ronnie)
cohort_40.assign_student(mark)
cohort_41.assign_student(geoff)
cohort_42.assign_student(shae)

# Instructors Assigning Exercises
joe.assign_exercises(ronnie, [student_exercise, petting_zoo])
joe.assign_exercises(
    mark, [kandy_korner, daily_journal, petting_zoo, student_exercise])
bry.assign_exercises(geoff, [student_exercise, petting_zoo])
madi.assign_exercises(shae, [kandy_korner, daily_journal])