Ejemplo n.º 1
0
tommy = Student("Tommy", "Oliver", "OGWhiteRanger")
billy = Student("Billy", "Cranston", "TriSaratops")
kim = Student("Kimberly", "Hart", "pinkCheer")
jason = Student("Jason", "Scott", "RedBeatsWhite")
zack = Student("Zack", "Taylor", "danceTillYouDrop")
trini = Student("Trini", "Kwan", "heartBreaker")

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")

Ejemplo n.º 2
0
c40.add_students(stephen)
e11.add_students(sarah)
c40.add_students(davis)
c42.add_students(david)
c40.add_students(zane)

zoe = Instructor("Zoe", "Ames", "zames",
                 "knowing every pie flavor ever created")
joe = Instructor("Joe", "Shephered", "joes",
                 "writing witty stories for our exercises")
bryan = Instructor("Bryan", "Nilsen", "bnelsen", "encouraging speeches")
greg = Instructor("Greg", "Korte", "gkorte",
                  "knowing every star wars character")

e11.add_instructors(zoe)
c40.add_instructors(joe)
c40.add_instructors(bryan)
c42.add_instructors(bryan)
e11.add_instructors(greg)

stephen.add_exercise(kandy_korner)
stephen.add_exercise(mushroom_picker)
davis.add_exercise(kandy_korner)
davis.add_exercise(planet_list)
sarah.add_exercise(planet_list)
sarah.add_exercise(star_wars)
david.add_exercise(star_wars)
david.add_exercise(stocks_report)
zane.add_exercise(mushroom_picker)
zane.add_exercise(stocks_report)
Ejemplo n.º 3
0
            if first_line == True:
                first_line = False
            else:
                if role == "student":
                    people.append(
                        Student(row[1], row[2], row[3], f"Cohort {cohort}"))
                else:
                    people.append(
                        Instructor(row[1], row[2], row[3], f"Cohort {cohort}",
                                   row[4]))
        return people


c36 = Cohort("Cohort 36")
c36.add_students(import_people("36", "student"))
c36.add_instructors(import_people("36", "instructor"))

c37 = Cohort("Cohort 37")
c37.add_students(import_people("37", "student"))
c37.add_instructors(import_people("37", "instructor"))

c38 = Cohort("Cohort 38")
c38.add_students(import_people("38", "student"))
c38.add_instructors(import_people("38", "instructor"))

cohorts = [c36, c37, c38]

for cohort in cohorts:
    for instructor in cohort.instructors:
        for student in cohort.students:
            for assign in range(2):