Cohort_36.join_cohort(36, Joseph_Brownlee)
Cohort_34.join_cohort(34, Molly_Brownlee)
Cohort_35.join_cohort(35, Scooby_Doo)

# 5. Create 3, or more, instructors and assign them to one of the cohorts.
Sponge_Bob_Squarepants = Instructor("Sponge Bob", "Squarepants", "@Spongebob", 34, "Wearing square pants.")
Dexter_Lab = Instructor("Dexter", "Lab", "@DextersLab", 36, "Building things in his laboratory.")
Bill_Gates = Instructor("Bill", "Gates", "@billGates", 35, "Mastermind of Microsoft")

Cohort_34.teach_cohort(Sponge_Bob_Squarepants)
Cohort_36.teach_cohort(Dexter_Lab)
Cohort_35.teach_cohort(Bill_Gates)

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

Sponge_Bob_Squarepants.assign_exercise(Molly_Brownlee, Web_Design)
Sponge_Bob_Squarepants.assign_exercise(Molly_Brownlee, Intro_to_JavaScript)
Dexter_Lab.assign_exercise(Caroline_Brownlee, Intro_to_Python)
Dexter_Lab.assign_exercise(Joseph_Brownlee, Intro_to_React)
Bill_Gates.assign_exercise(Scooby_Doo, Web_Design)
Bill_Gates.assign_exercise(Scooby_Doo, Flexbox)

# If I had a student instance referenced by the variable ivan:

# Create a list of students. Add all of the student instances to it.
# students = list()
# Create a list of exercises. Add all of the exercise instances to it.
# exercises = list()
# Now, generate a report that displays which students are working on which exercises.

# Example
Пример #2
0
cohort_40 = Cohort("Cohort 40")
cohort_41 = Cohort("Cohort 41")
cohort_42 = Cohort("Cohort 42")

evan_reynolds = Student("Evan", "Reynolds", "Evan-Reynolds", cohort_40)
roxanne_nasraty = Student("Roxanne", "Nasraty", "Roxanne-Nasraty", cohort_40)
john_smith = Student("John", "Smith", "John-Smith", cohort_41)
jane_doe = Student("Jane", "Doe", "Jane-Doe", cohort_42)

joe_shepherd = Instructor("Joe", "Shepherd", "Joe-Shepherd", cohort_40,
                          "jokes")
bryan_nilsen = Instructor("Bryan", "Nilsen", "Bryan-Nilsen", cohort_41,
                          "high-fives")
maddi_peper = Instructor("Madi", "Peper", "Madi-Peper", cohort_42, "smiles")

joe_shepherd.assign_exercise(create_list, evan_reynolds)
joe_shepherd.assign_exercise(create_list, roxanne_nasraty)
joe_shepherd.assign_exercise(create_list, john_smith)
joe_shepherd.assign_exercise(create_list, jane_doe)
joe_shepherd.assign_exercise(create_dictionary, evan_reynolds)
joe_shepherd.assign_exercise(create_dictionary, roxanne_nasraty)
joe_shepherd.assign_exercise(create_dictionary, john_smith)
joe_shepherd.assign_exercise(create_dictionary, jane_doe)

bryan_nilsen.assign_exercise(create_tuple, evan_reynolds)
bryan_nilsen.assign_exercise(create_tuple, roxanne_nasraty)
bryan_nilsen.assign_exercise(create_tuple, john_smith)
bryan_nilsen.assign_exercise(create_tuple, jane_doe)
bryan_nilsen.assign_exercise(create_set, evan_reynolds)
bryan_nilsen.assign_exercise(create_set, roxanne_nasraty)
bryan_nilsen.assign_exercise(create_set, john_smith)
Пример #3
0
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:
        for exercise in student.exercises:
            if exercise == student.exercises[-2]:
                student_work += f"{exercise.name} and "
            elif exercise == student.exercises[-1]:
# Create 3, or more, instructors and assign them to one of the cohorts.

bryan_neilson = Instructor("Bryan", "Neilson", "bryanneilson", "dad jokes")
kristen_norris = Instructor("Kristen", "Norris", "kristennorris", "to-the-point responses")
andy_collins = Instructor("Andy", "Collins", "andycollins", "dry humor")

cohort_36.instructors.append(andy_collins)
andy_collins.cohort = cohort_36.name
cohort_37.instructors.append(bryan_neilson)
bryan_neilson.cohort = cohort_37.name
cohort_38.instructors.append(kristen_norris)
kristen_norris.cohort = cohort_38.name

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

kristen_norris.assign_exercise(python_dictionaries, alyssa_nycum)
kristen_norris.assign_exercise(python_lists, alyssa_nycum)
kristen_norris.assign_exercise(python_sets, alyssa_nycum)
kristen_norris.assign_exercise(python_sets, katie_wohl)
kristen_norris.assign_exercise(python_tuples, katie_wohl)
bryan_neilson.assign_exercise(python_dictionaries, onterio_wright)
bryan_neilson.assign_exercise(python_lists, onterio_wright)
andy_collins.assign_exercise(python_sets, john_long)
andy_collins.assign_exercise(python_tuples, john_long)

# Create a list of students. Add all of the student instances to it.

students = [alyssa_nycum, katie_wohl, john_long, onterio_wright]

# Create a list of exercises. Add all of the exercise instances to it.
Пример #5
0
alexa.cohort = "cohort_103"

# Create 3 or more instructors and assign them to a cohort
lupin = Instructor("Romulus", "Lupin", "howlsatthemoon",
                   "always there if you need chocolate")
snape = Instructor("Severus", "Snape", "snivellus", "looking gloomy")
lockhart = Instructor("Gilderoy", "Lockhart",
                      "sexyandiknowit", "always looking fresh")

lupin.cohort = "cohort_44"
snape.cohort = "cohort_113"
lockhart.cohort = "cohort_103"


# Have each instructor assign 2 exercises to each of the students
lupin.assign_exercise(me, methods_review)
lupin.assign_exercise(me, classes_practice)
lupin.assign_exercise(you, methods_review)
lupin.assign_exercise(you, classes_practice)
lupin.assign_exercise(siri, methods_review)
lupin.assign_exercise(siri, classes_practice)
lupin.assign_exercise(alexa, methods_review)
lupin.assign_exercise(alexa, classes_practice)

snape.assign_exercise(me, face_space)
snape.assign_exercise(me, sleepster)
snape.assign_exercise(you, face_space)
snape.assign_exercise(you, sleepster)
snape.assign_exercise(siri, face_space)
snape.assign_exercise(siri, sleepster)
snape.assign_exercise(alexa, face_space)
Пример #6
0
#     jisie.assign_exercise(student, chicken_monkey_js)
#     jisie.assign_exercise(student, city_planner)

#     jenna.assign_exercise(student, pizza_joint)
#     jenna.assign_exercise(student, cars)

#     joe.assign_exercise(student, taco_stand)
#     joe.assign_exercise(student, dog_show)

# for student in dc36.students:
#     for exercise in student.current_exercises:
#         print(f"{student.first_name} has been assigned {exercise.name} in {exercise.language}")
#     print()

#### CHALLENGE!!!
jisie.assign_exercise(ryan, chicken_monkey_js)
jisie.assign_exercise(james, city_planner)
jisie.assign_exercise(charles, city_planner)

jenna.assign_exercise(ryan, pizza_joint)
jenna.assign_exercise(james, cars)

joe.assign_exercise(ryan, taco_stand)

# Create a list of students. Add all of the student instances to it.
all_students = dc36.students

# Create a list of exercises. Add all of the exercise instances to it.
all_exercises = [
    chicken_monkey_js, city_planner, pizza_joint, cars, taco_stand, dog_show
]
Пример #7
0
student4 = Student("Taelyn", "Dickens", "taelyndickens")

cohort38.students.append(student1)
cohort39.students.append(student2)
cohort40.students.append(student3)
cohort38.students.append(student4)

instructor1 = Instructor("Jayden", "Massey", "jaydenmassey")
instructor2 = Instructor("Love", "Grayson", "lovegrayson")
instructor3 = Instructor("Anita", "Cruz", "anitacruz")

cohort38.instructors.append(instructor1)
cohort39.instructors.append(instructor2)
cohort40.instructors.append(instructor3)

instructor1.assign_exercise(student1, exercise1)
instructor1.assign_exercise(student1, exercise2)

instructor1.assign_exercise(student2, exercise1)
instructor1.assign_exercise(student2, exercise2)

instructor1.assign_exercise(student3, exercise3)
instructor1.assign_exercise(student3, exercise4)

instructor1.assign_exercise(student4, exercise3)
instructor1.assign_exercise(student4, exercise4)

#Challenge
students = [student1, student2, student3, student4]
exercises = [exercise1, exercise2, exercise3, exercise4]
Пример #8
0
steve.first_name = "Steve"
steve.last_name = "Brownlee"
steve.slack_handle = "@coach"
steve.cohort = cohort_37
adam = Instructor("disgressing")
adam.first_name = "Adam"
adam.last_name = "Sheaffer"
adam.slack_handle = "@adams"
adam.cohort = cohort_39
mo = Instructor("interpretive dance")
mo.first_name = "Mo"
mo.last_name = "Silvera"
mo.slack_handle = "@momoney"
mo.cohort = cohort_36

steve.assign_exercise(holden, martins_aquarium)
steve.assign_exercise(holden, kennels)
steve.assign_exercise(willy, martins_aquarium)
steve.assign_exercise(willy, kennels)
adam.assign_exercise(daniel, bank_heist)
adam.assign_exercise(daniel, bangazon)
mo.assign_exercise(trey, bangazon)
mo.assign_exercise(trey, martins_aquarium)

students = list()
students.append(holden)
students.append(daniel)
students.append(trey)
students.append(willy)

exercises = list()
Пример #9
0
student_two = Student("Melody", "Stern", "melodystern", "C36")
student_three = Student("Sarah", "Fleming", "sarahfleming", "C34")
student_four = Student("John", "Snow", "winteriscoming", "E11")
# print(student_four)

# Challenge: Create a list of students. Add all of the student instances to it.
studentsArray = [student_one, student_two, student_three, student_four]

# Create 3, or more, instructors and assign them to one of the cohorts.
instructor_one = Instructor("Jisie", "David", "jisiedavid", "C36",
                            "Master of Explaining Things")
instructor_two = Instructor("Joe", "Shepherd", "joeshep", "C34", "Funny Man")
instructor_three = Instructor("Jenna", "Solis", "jsolis", "E11",
                              "Elegant and Sweet")
# print(instructor_one)

# Have each instructor assign 2 exercises to each of the students.
instructor_one.assign_exercise(student_one, exercise_five.name)
instructor_one.assign_exercise(student_two, exercise_five.name)
instructor_two.assign_exercise(student_one, exercise_two.name)
instructor_two.assign_exercise(student_four, exercise_one.name)
instructor_three.assign_exercise(student_four, exercise_three.name)
instructor_three.assign_exercise(student_one, exercise_four.name)

# for exercise in student_one.exercises:
#     print(exercise.name)

# print(student_one.list_exercises)

for student in studentsArray:
    student.list_exercises()
Пример #10
0
allStudentsArray = [
    student_treySuiter, student_jimJam, student_fredFlip, student_jilJones
]

#Instructors
instructor_joeShep = Instructor("Joe", "Sheppard", "joeshep", "Cohort 36",
                                "Board Games")
instructor_jisieDavid = Instructor("Jisie", "David", "jisiedavid", "Cohort 37",
                                   "Ping Pong")
instructor_kristenNorris = Instructor("Kristen", "Norris", "kristen_norris",
                                      "Cohort 37", "Volleyball")
instruct_RoseW = Instructor("Rose", "Wzuoutki", "roseW", "Cohort 38",
                            "Billiards")

#Assigning exercises
instructor_joeShep.assign_exercise(student_treySuiter, ex_chickenMonkey)
instructor_joeShep.assign_exercise(student_treySuiter, ex_myJournal)
instructor_joeShep.assign_exercise(student_treySuiter, ex_reactiveNutshell)
instructor_joeShep.assign_exercise(student_treySuiter, ex_celebrityTribute)

instructor_jisieDavid.assign_exercise(student_jimJam, ex_myJournal)
instructor_jisieDavid.assign_exercise(student_jimJam, ex_celebrityTribute)
instructor_jisieDavid.assign_exercise(student_jimJam, ex_chickenMonkey)

instructor_kristenNorris.assign_exercise(student_fredFlip, ex_celebrityTribute)
instructor_kristenNorris.assign_exercise(student_fredFlip, ex_reactiveNutshell)

instruct_RoseW.assign_exercise(student_jilJones, ex_reactiveNutshell)

for student in allStudentsArray:
Пример #11
0
student4 = Student('slab', 'onDeck', 'bruh')

mo = Instructor('mo', 'money', 'Moooo', 'smart')
willy = Instructor('willy', 'metcalf', 'wizzle', 'raves')
william = Instructor('William', 'green', 'wgreen', 'being late')

cohort1.students.append(student1)
cohort2.students.append(student2)
cohort3.students.append(student3)
cohort3.students.append(student4)

cohort1.instructors.append(mo)
cohort2.instructors.append(willy)
cohort3.instructors.append(william)

william.assign_exercise(student1, bangazon)
william.assign_exercise(student1, nutshell)

mo.assign_exercise(student2, nutshell)
mo.assign_exercise(student2, reactnutshell)

willy.assign_exercise(student3, trestlebridge)
willy.assign_exercise(student3, reactnutshell)

william.assign_exercise(student4, bangazon)
william.assign_exercise(student4, trestlebridge)

all_students = [student1, student2, student3, student4]
all_exercises = [nutshell, reactnutshell, bangazon, trestlebridge]

for student in all_students:
Пример #12
0
second_exercise = Exercise("2", "python")
third_exercise = Exercise("3", "python")
forth_exercise = Exercise("4", "python")

three_six = Cohort("Cohort 36")
three_seven = Cohort("Cohort 37")
three_eight = Cohort("Cohort 38")

guy = Student("Guy", "Cherkesky", "guy", "Cohort 36")
erin = Student("Erin", "Polley", "erin", "Cohort 36")
ryan = Student("Ryan", "Crowley", "ryan", "Cohort 36")
sam = Student("Sam", "Pita", "sam", "Cohort 36")

Joe = Instructor("Joe", "Shepherd", "joe", "Cohort 36",
                 "Awesome at teaching Python")
Jisie = Instructor("Jisie", "David", "jisie", "Cohort 36",
                   "Javascript and React Guru")
Jenna = Instructor("Jenna", "Solis", "jenna", "Cohort 36",
                   "Fashion consultant and developer")

Joe.assign_exercise(guy, second_exercise)
Jisie.assign_exercise(ryan, third_exercise)
Jenna.assign_exercise(erin, forth_exercise)


def exercise_list(list):
    for list_item in list:
        print(f"{list_item.name} is what I have to do today")


exercise_list(sam.exercises)
Пример #13
0
bob.cohort = cohort_39.name
cohort_40.students.append(dora)
dora.cohort = cohort_40.name

andy = Instructor("Andy", "Collins", "AndyCollins", "all-knowing")
bryan = Instructor("Bryan", "Neilson", "BryanNeilson", "high fives")
kristen = Instructor("Kristen", "Norris", "KristenNorris", "to the point answers")

cohort_38.instructors.append(kristen)
kristen.cohort = cohort_38.name
cohort_39.instructors.append(andy)
andy.cohort = cohort_39.name
cohort_40.instructors.append(bryan)
bryan.cohort = cohort_40.name

andy.assign_exercise(lists, bob)
andy.assign_exercise(tuples, bob)
bryan.assign_exercise(lists, dora)
bryan.assign_exercise(tuples, dora)
kristen.assign_exercise(dictionaries, cody)
kristen.assign_exercise(sets, dustin)

students = [cody, dustin, bob, dora]
exercises = [lists, dictionaries, tuples, sets]

for student in students:
    print(f"\n{student.first} {student.last} is working on:")
    for exercise in exercises:
        for studentEx in student.exercises:
            if exercise.name == studentEx.name:
                print(exercise.name)
Пример #14
0
)
ex_2 = Exercise("2", "python")
ex_3 = Exercise("3", "python")
ex_4 = Exercise("4", "python")

three_six = Cohort("Cohort 36")
three_seven = Cohort("Cohort 37")
three_eight = Cohort("Cohort 38")

erin = Student("Erin", "Polley", "erin", "Cohort 36")
corri = Student("Corri", "Golden", "corri", "Cohort 36")
bito = Student("Bito", "Mann", "bito", "Cohort 38")
matt = Student("Matt", "Cragg", "cragg", "Cohort 36")

joe = Instructor("Joe", "Shepherd", "joe", "Cohort 36", "80s jokes")
jisie = Instructor("Jisie", "David", "jisie", "Cohort 36", "polite shut ups")
jenna = Instructor("Jenna", "Solis", "jenna", "Cohort 36",
                   "fashion and knowing her shit")

joe.assign_exercise(matt, ex_1)
jisie.assign_exercise(bito, ex_2)
jenna.assign_exercise(corri, ex_3)


def exercise_list(list):
    for list_item in list:
        print(f"{list_item.name} is what I have to do today")


exercise_list(matt.exercises)
Пример #15
0
zordon = Instructor("Zordon", "Redacted", "itsMorphinTime1", "turning children to solders")
alpha5 = Instructor("Alpha5", "Robot", "betterThenZordon", "caretaker")
rita = Instructor("Rita", "Repulsa", "moon4thewin", "making people bigger")

ninety_three = Cohort("Cohort 93")
ninety_three.add_students(billy)
ninety_three.add_students(kim)
ninety_three.add_instructors(zordon)
ninety_four = Cohort("Cohort 94")
ninety_four.add_students(tommy)
ninety_four.add_students(jason)
ninety_four.add_instructors(alpha5)
ninety_five = Cohort("Cohort 95")
ninety_five.add_students(zack)
ninety_five.add_students(trini)
ninety_five.add_instructors(rita)

puddy_buddy = Exercise("Puddy Buddy", "JavaScript")
morphin_time = Exercise("Morphin Time", "HTML/CSS")
calling_zords = Exercise("Call your Zords instructions", "JSON server")
megazord_formation = Exercise("Form the Megazord", "Python")


zordon.assign_exercise(puddy_buddy, ninety_three)
zordon.assign_exercise(megazord_formation, ninety_three)
alpha5.assign_exercise(morphin_time, ninety_four)
alpha5.assign_exercise(calling_zords, ninety_four)
rita.assign_exercise(puddy_buddy, ninety_five)
rita.assign_exercise(morphin_time, ninety_five)

print(tommy.last_name)
Пример #16
0
from exercise import Exercise
from instructor import Instructor
from student import Student
from nssperson import NSSPerson

daily_journal = Exercise("Daily Journal", "Javascript")
student_exercises = Exercise("Student Exercises", "Python")
perennial = Exercise("Capstone", "React")
nutshell = Exercise("Nutshell", "Javascript")

cohort_38 = Cohort("Cohort 38")
cohort_37 = Cohort("Cohort 37")
cohort_24 = Cohort("Cohort 24")
cohort_9 = Cohort("Evening Cohort 9")

bjork_g = Student("Bjork", "Guðmundsdóttir", "@bjorkg", cohort_9)
kate_bush = Student("Kate", "Bush", "@wutheringheights", cohort_38)
kurt_cobain = Student("Kurt", "Cobain", "@nirvana", cohort_37)
billy_holiday = Student("Billy", "Holiday", "@gloomybilly", cohort_24)

thom_yorke = Instructor("Thom", "Yorke", "@thomyorke", cohort_9)
elizabeth_fraiser = Instructor("Elizabeth", "Frasier", "@pearlydewdropsdrop",
                               cohort_38)
billy_corgan = Instructor("Billy", "Corgan", "@patrick", cohort_24)
bilinda_butcher = Instructor("Bilinda", "Butcher", "@bilindab", cohort_37)

bilinda_butcher.assign_exercise(kurt_cobain, perennial)
billy_corgan.assign_exercise(billy_holiday, nutshell)
elizabeth_fraiser.assign_exercise(kate_bush, student_exercises)
thom_yorke.assign_exercise(bjork_g, daily_journal)
Пример #17
0
jim = Student('Jim', 'Halpert', 'lil_jimmy', 38, python_tutorial,
              react_project)
dwight = Student('Dwight', "Shrute", 'beets_FTW', 37, c_sharp_gold,
                 chicken_monkey)
pam = Student('Pam', 'Beasley', 'white_shoes_4Eva', 39, css_grid, UI_test)
creed = Student('Creed', "Bratton", 'www.creedthoughts.com/gov', 38, word_doc,
                puzzles)

###### Instructors

andy = Instructor('Andy', 'Collins', 'handy_andy_4', cohort_38, 'yo-yos')
bryan = Instructor('Bryan', 'Nielsen', 'B-Nee-Baby', cohort_39, 'betrayal')
michael = Instructor('Michael', 'Scott', '80085_lol', cohort_37,
                     'being the best damn boss ever')

andy.assign_exercise(flexbox, jim)
andy.assign_exercise(itinerary, jim)

andy.assign_exercise(flexbox, creed)
andy.assign_exercise(cars, creed)

bryan.assign_exercise(nutshell, pam)
bryan.assign_exercise(itinerary, pam)

michael.assign_exercise(cars, dwight)
michael.assign_exercise(nutshell, dwight)

#########Challenge
students = [jim, dwight, pam, creed]

for student in students:
Пример #18
0
#assign students
cohort36.add_student(ryan1)
cohort36.add_student(ryan2)
cohort36.add_student(ryan3)
cohort36.add_student(sullivan)

#create instructors
joe = Instructor("Joe", "Shepherd", "js1", "funny")
jisie = Instructor("Jisie", "David", "jd1", "good at instructing")
jenna = Instructor("Jenna", "not sure", "jn1", "teaching")

#assign instructors
cohort36.add_instructor(joe)
cohort36.add_instructor(jisie)
cohort36.add_instructor(jenna)

#assign exercises
joe.assign_exercise(ryan1, exercise1)
joe.assign_exercise(ryan1, exercise2)
jisie.assign_exercise(ryan2, exercise2)
jisie.assign_exercise(ryan2, exercise3)
jenna.assign_exercise(sullivan, exercise3)
jenna.assign_exercise(sullivan, exercise4)
joe.assign_exercise(ryan3, exercise1)
joe.assign_exercise(ryan3, exercise2)

print(ryan1.cohort)

cohort36.list_student_exercises()
c28 = Cohort("Cohort 28")
c34 = Cohort("Cohort 34")

scivarolo = Student("Sebastian", "Civarolo", "SebastianCiv", "c28")
rhecht = Student("Robby", "Hecht", "RobbyHecht", c28)
dstorm = Student("Dan", "Storm", "DanceStorm", c32)
eclarke = Student("Eliot", "Clarke", "EliotClarke", c32)
ccrutchfield = Student("Curtis", "Crutchfield", "CurtisCrutchfield", c32)
jmccray = Student("Jacquelyn", "McCray", "JacquelynMcCray", c34)

sbrownlee = Instructor("Steve", "Brownlee", "Coach", c32, "Javascript")
jshep = Instructor("Joe", "Shepherd", "Joes", c28, "Python")
jdavid = Instructor("Jisie", "David", "Jisie", c34, "C#")

# have instructors assign exercises
jshep.assign_exercise(rhecht, chickenmonkey)
jshep.assign_exercise(rhecht, kennel)
jshep.assign_exercise(scivarolo, chickenmonkey)
jshep.assign_exercise(scivarolo, kandykorner)
sbrownlee.assign_exercise(dstorm, flexboxfroggy)
sbrownlee.assign_exercise(dstorm, kandykorner)
sbrownlee.assign_exercise(eclarke, kennel)
sbrownlee.assign_exercise(eclarke, flexboxfroggy)
jdavid.assign_exercise(ccrutchfield, chickenmonkey)
jdavid.assign_exercise(ccrutchfield, flexboxfroggy)
jdavid.assign_exercise(jmccray, kennel)
jdavid.assign_exercise(jmccray, kandykorner)

students = list()
students.extend([scivarolo, rhecht, dstorm, eclarke, jmccray, ccrutchfield])
Пример #20
0
matt = Student("Matt", "Blagg")

c36.students.extend([bito, jack, matt])

# Create 3, or more, instructors and assign them to one of the cohorts.
andy = Instructor("Andy", "Collins")
bryan = Instructor("Bryan", "Nilson")
jisie = Instructor("Jisie", "David")

c38.instructors.extend([andy, bryan, jisie])
for instructor in c38.instructors:
    print(f"{instructor.first_name} {instructor.last_name}")

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

andy.assign_exercise(chicken_monkey_js, jack)
andy.assign_exercise(city_planner, jack)

andy.assign_exercise(these_area_a_few_of_my_favorite_things, erin)
andy.assign_exercise(daily_journal_one, erin)

bryan.assign_exercise(city_planner, matt)
bryan.assign_exercise(chicken_monkey_js, matt)

jisie.assign_exercise(daily_journal_one, bito)
jisie.assign_exercise(city_planner, bito)


# for student in dc36.students:
#     for exercise in student.current_exercises:
#         print(f"{student.first_name} has been assigned {exercise.name} in {exercise.language}")
Пример #21
0
cohort_10 = Cohort('Cohort 10')
cohort_20 = Cohort('Cohort 20')
cohort_30 = Cohort('Cohort 30')

julia = Student('Julia', 'Louis-Dreyfuss', 'Julia Louis-Dreyfuss', cohort_10)
jerry = Student('Jerry', 'Seinfeld', 'Jerry Seinfeld', cohort_20)
jason = Student('Jason', 'Alexander', 'Jason Alexander', cohort_30)
michael = Student('Michael', 'Richards', 'Michael Richards', cohort_10)

joe = Instructor('Joe', 'Shepherd', 'Joe Shepherd', cohort_10, 'Funny Voices')
steve = Instructor('Steve', 'Brownlee', 'Steve Brownlee', cohort_20,
                   'Teaching')
brenda = Instructor('Brenda', 'Long', 'Brenda Long', cohort_30, 'Design')

joe.assign_exercise(create_webpage, julia)
joe.assign_exercise(create_webpage, jerry)
joe.assign_exercise(create_webpage, jason)
joe.assign_exercise(create_webpage, michael)
joe.assign_exercise(style_webpage, julia)
joe.assign_exercise(style_webpage, jerry)
joe.assign_exercise(style_webpage, jason)
joe.assign_exercise(style_webpage, michael)

steve.assign_exercise(make_dynamic, julia)
steve.assign_exercise(make_dynamic, jerry)
steve.assign_exercise(make_dynamic, jason)
steve.assign_exercise(make_dynamic, michael)
steve.assign_exercise(modularize_javascript, julia)
steve.assign_exercise(modularize_javascript, jerry)
steve.assign_exercise(modularize_javascript, jason)
Пример #22
0
cohort35 = Cohort("Day Cohort 35")
cohort36 = Cohort("Day Cohort 36")
cohort37 = Cohort("Day Cohort 37")
cohort38 = Cohort("Day Cohort 38")

student1 = Student("Taylor", "Carroll", "taylorhc")
student2 = Student("Sage", "Klein", "sagey")
student3 = Student("Keith", "Potempa", "kpotempa")
student4 = Student("Nate", "Vogel", "nvogel")

mo = Instructor("mo", "mo", "itsmo", "Backend C#")
madi = Instructor("Madi", "Pepper", "peppers", "Beat Saber")
brenda = Instructor("Brenda", "Long", "blong", "UX/UI")

mo.assign_exercise(student1, nutshell)
mo.assign_exercise(student1, reactnutshell)
mo.assign_exercise(student2, bangazon)
mo.assign_exercise(student3, trestlebridge)
mo.assign_exercise(student4, trestlebridge)

students = []
students.append(student1)
students.append(student2)
students.append(student3)
students.append(student4)

exercises = []
exercises.append(nutshell)
exercises.append(reactnutshell)
exercises.append(bangazon)
Пример #23
0
exercise_three = Exercise("Sets", "Python")
exercise_four = Exercise("Dictionaries", "Python")

cohort_38 = Cohort("C38")
cohort_35 = Cohort("C35")
cohort_36 = Cohort("C36")

ryan_b = Student("Ryan", "Bishop", "rdb", cohort_36)
bito_m = Student("Bito", "Mann", "bito", cohort_38)
shirish_s = Student("Shirish", "Shrestha", "Shirish Shrestha", cohort_35)
ryan_c = Student("Ryan", "Cunningham", "Ryan H. Cunningham", cohort_36)

joe_shep = Instructor("Joe", "Shepherd", "joeshep", "Board game guru", cohort_36)
jisie = Instructor("Jisie", "David", "Jisie David", "Keeping Joe in line", cohort_36)
jenna = Instructor("Andy", "Collins", "acollins", "Comedy King", cohort_38)

joe_shep.assign_exercise(ryan_b, exercise_one)
joe_shep.assign_exercise(ryan_b, exercise_two)
jenna.assign_exercise(ryan_b, exercise_three)
jisie.assign_exercise(bito_m, exercise_one)
jisie.assign_exercise(bito_m, exercise_three)
jenna.assign_exercise(shirish_s, exercise_two)
jenna.assign_exercise(shirish_s, exercise_four)
joe_shep.assign_exercise(ryan_c, exercise_four)
joe_shep.assign_exercise(ryan_c, exercise_two)

students = [ryan_b, ryan_c, shirish_s, bito_m]
exercises = [exercise_one, exercise_two, exercise_three, exercise_four]

for student in students:
    student.show_assignments()
Пример #24
0
Joe = Instructor("Joe", "Shepherd", "Joe Shepherd", "Making Python Fun!", C36.name)
Brenda = Instructor("Brenda", "Long", "Brenda Long", "Dancing to funny videos", E9.name)
Steve = Instructor("Steve", "Brownlee", "Steve Brownlee", "Blogging", C37.name)

C36.add_instructor(Joe)
C37.add_instructor(Steve)
E9.add_instructor(Brenda)

C36.add_student(John)
C36.add_student(Jeremiah)
C37.add_student(Holden)
E9.add_student(Anonymous)

E9.show_students()
C36.show_students()
Joe.assign_exercise(C36, kennel)
Joe.assign_exercise(C36, journal)
Brenda.assign_exercise(E9, cash_coins)
Brenda.assign_exercise(E9, kennel)
Steve.assign_exercise(C37, nutshell)
Steve.assign_exercise(C37, journal)

John.student_info()
Jeremiah.student_info()
Holden.student_info()





Пример #25
0
# Checking that students are in their cohorts
# print(cobra_kai.students[0].first_name)
# print(miyagi_dojo.students[0].first_name)
# print(day_cohort_98.students[0].first_name)
# print(day_cohort_98.students[1].first_name)


# Creating instructors
nariyoshi_miyagi = Instructor("Nariyoshi", "Miyagi", "Mr.Miyagi", "Day Cohort Miyagi Dojo", "Crane Kick")

john_kreese = Instructor("John", "Kreese", "NoMercy", "Night Cohort Cobra Kai", "Sweep The Leg")

frank_n_furter = Instructor("Frank", "Furter","Sw337_7ransv3s7173", "Day Cohort 98", "The Time Warp")

# Instructors assigning exercises 
nariyoshi_miyagi.assign_exercise(daniel_larusso, paint_the_fence)
nariyoshi_miyagi.assign_exercise(daniel_larusso, paint_the_house)
print("Daniel,", daniel_larusso.exercises[0].name)
print("Daniel,", daniel_larusso.exercises[1].name)

john_kreese.assign_exercise(johhny_lawrence, wax_on)
john_kreese.assign_exercise(johhny_lawrence, wax_off)
print("Johnny,", johhny_lawrence.exercises[0].name)
print("Johnny,", johhny_lawrence.exercises[1].name)


for student in day_cohort_98.students:
    frank_n_furter.assign_exercise(student, wax_on)
    frank_n_furter.assign_exercise(student, sand_the_floor)

for exercise in janet_doe.exercises:
Пример #26
0
c40.students.append(ryuji)
c50.students.append(samo)
c9001.students.append(goku)

#Create 3 instructors
igor = Instructor("Igor", "???", "velvetroom", "Cohort 40", "rehabilitation")
bobby = Instructor("Robert", "Pierson", "warped-thinker", "Cohort 50", "good music")
aug = Instructor("Augusto", "Iverson", "doctor-lifehacks", "Cohort 9001", "being toxic")

#Assign instructors to cohorts
c40.instructors.append(igor)
c50.instructors.append(bobby)
c9001.instructors.append(aug)

#Assign exercises to students
igor.assign_exercise(eli_lavoie, student_exercises)
igor.assign_exercise(ryuji, student_exercises)
igor.assign_exercise(eli_lavoie, petting_zoo)
igor.assign_exercise(ryuji, petting_zoo)

bobby.assign_exercise(samo, celeb_tribute)
bobby.assign_exercise(samo, react_nutshell)

aug.assign_exercise(goku, celeb_tribute)
aug.assign_exercise(goku, react_nutshell)

cohorts = list()
cohorts.append(c40)
cohorts.append(c50)
cohorts.append(c9001)
Пример #27
0
monkey_chicken = Exercise("MonkeyChicken", "Python")
welcome_to_nashville = Exercise("Welcome to Nashville", "JavaScript")
celebrity_tribute = Exercise("Celebrity Tribute", "HTML")
nutshell = Exercise("Nutshell", "ReactJS")

day_cohort_36 = Cohort("Day Cohort 36")
day_cohort_45 = Cohort("Day Cohort 45")
night_cohort_15 = Cohort("Evening Cohort 15")

christian = Student("Christian", "Pippin", "@cpippin98")
lauren = Student("Lauren", "Riddle", "@lriddle19")
corri = Student("Corri", "Golden", "@cgolden17")
matt = Student("Matt", "Blagg", "@mblagg45")
chase = Student("Chase", "Fite", "@cfite76")

day_cohort_36.add_student(christian)
night_cohort_15.add_student(lauren)
day_cohort_45.add_student(corri)
day_cohort_36.add_student(matt)
night_cohort_15.add_student(chase)

joe = Instructor("Joe", "Shepherd", "@jshepherd24", "Python")
jisie = Instructor("Jisie", "David", "@jdavid36", "JavaScript")
jenna = Instructor("Jenna", "Solis", "@jsolis09", "CSharp")

day_cohort_36.add_instructor(joe)
night_cohort_15.add_instructor(jisie)
day_cohort_45.add_instructor(jenna)

joe.assign_exercise(christian, monkey_chicken)
Пример #28
0
James = Student('James', 'Smith', 'Fauhs')

cohort32.add_student(Jim)
cohort33.add_student(John)
cohort9.add_student(Janger)
cohort33.add_student(James)

Sally = Instructor('Sally', 'Flemming', 'SalFlem', 'Farting')
Larry = Instructor('Larry', 'Yrral', 'Larrrr', 'Fencing')
Lu = Instructor('Lu', 'LJ', 'Plre', 'Swimming')

cohort32.add_instructor(Sally)
cohort33.add_instructor(Larry)
cohort9.add_instructor(Lu)

Sally.assign_exercise(exercise1, Jim)
Sally.assign_exercise(exercise2, John)
Larry.assign_exercise(exercise3, Janger)
Larry.assign_exercise(exercise4, James)
Lu.assign_exercise(exercise1, James)
Lu.assign_exercise(exercise2, Janger)
Lu.assign_exercise(exercise3, John)
Larry.assign_exercise(exercise4, Jim)

students = list()
students.append(Jim)
students.append(John)
students.append(Janger)
students.append(James)

exercises = list()
Пример #29
0
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)
jenna.assign_exercise(treyTrey, exercise2, exercise3)
jenna.assign_exercise(samSam, exercise2, exercise4)
andy.assign_exercise(treyTrey, exercise2, exercise3)
andy.assign_exercise(samSam, exercise2, exercise4)
steve.assign_exercise(treyTrey, exercise2, exercise3)
steve.assign_exercise(samSam, exercise2, exercise4)

print(samSam.exercises[0].name)
Пример #30
0
pet_adoption_center = Exercise('Pet Adoption Center', 'Java')

# Students
brian = Student('Brian', 'Cravens', 'b.craven', 'Cohort 40')
daniel = Student('Daniel', 'Meza', 'd.meza', 'Cohort 47')
john = Student('John', 'Bain', 'j.bain', 'Cohort 40')
adrian = Student('Adrian', 'Garmendia', 'a.garmendia', 'Cohort 40')
patton = Student('Patton', 'Oswalt', 'p.oswalt', 'Cohort 100000')

# Instructors
bryan = Instructor('Bryan', 'Nilsen', 'b.nilsen', 'Reading while walking', 'Cohort 40')
joe = Instructor('Joe', 'Shepard', 'j.shepard', 'announcing minor league baseball games', 'Cohort 100000')
madi = Instructor('Madi', 'Peper', 'm.peper', 'running in circles without losing balance', 'Cohort 47')

# instructors assigning exercises
bryan.assign_exercise(daniel, joes_sheep_pen)
bryan.assign_exercise(daniel, hogwarts_sorting_hat)
bryan.assign_exercise(brian, tamagotchi)
bryan.assign_exercise(brian, joes_sheep_pen)
joe.assign_exercise(john, pet_adoption_center)
joe.assign_exercise(john, tamagotchi)
joe.assign_exercise(adrian, pet_adoption_center)
joe.assign_exercise(adrian, hogwarts_sorting_hat)
madi.assign_exercise(patton, hogwarts_sorting_hat)
madi.assign_exercise(patton, tamagotchi)
madi.assign_exercise(daniel, pet_adoption_center)
madi.assign_exercise(john, hogwarts_sorting_hat)


# Cohorts
cohort_40 = Cohort('Cohort 40')