Example #1
0
    def all_cohorts(self):
        """Retrieve all cohorts"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])

            db_cursor = conn.cursor()

            execute_query = db_cursor.execute("""
            SELECT c.Id,
                c.Name
            FROM Cohort c
            """)

            # print(execute_query)

            all_cohorts = db_cursor.fetchall()

            # print(all_cohorts)

            # When there is no row_factory function defined, we get a list of tuples
            # for student in all_cohorts:
            #     print(f'{student[1]} {student[2]} is in {student[5]}')

            # We have a row_factory function specified. That lambda takes each tuple and returns an instance of the Student class
            for cohort in all_cohorts:
                print(cohort)
    def all_cohorts(self):
        """Retrieve all cohorts"""
        row_factory = lambda cursor, row: Cohort(row[1])
        query = """SELECT * FROM Cohort;"""

        response = self.get_data(row_factory, query)
        self.print_report("All Cohorts", response)
 def all_cohorts(self):
     """Retrieve all cohorts"""
     with sqlite3.connect(self.db_path) as conn:
         conn.row_factory = lambda cursor, row: Cohort(row[0])
         db_cursor = conn.cursor()
         db_cursor.execute("""
          SELECT c.name FROM Cohort AS c
          """)
         all_cohorts = db_cursor.fetchall()
         #  Cohort has a __repr__ function that returns the string rather than the object
         [print(c) for c in all_cohorts]
Example #4
0
    def all_cohorts(self):
        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            SELECT Id, Name
            FROM Cohort
            """)

            all_cohorts = db_cursor.fetchall()

            [print(c) for c in all_cohorts]
    def all_cohorts(self):
        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
                    SELECT c.id, c.name
                    FROM Cohort c
                """)

            all_cohorts = db_cursor.fetchall()

            print(f"\nAll cohorts")
            [print(f" {cohort}") for cohort in all_cohorts]
Example #6
0
    def all_cohorts(self):

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            SELECT c.Id,
            c.Cohort_Name
            FROM Cohort c """)

            all_cohorts = db_cursor.fetchall()
            print('\nAll Cohorts')
            [print(s) for s in all_cohorts]
Example #7
0
    def all_cohorts(self):
        """Retrieve all cohorts"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[0], row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            SELECT c.Id, c.Name
            FROM Cohort c
            ORDER BY c.Id;
            """)

            all_cohorts = db_cursor.fetchall()

            [print(c) for c in all_cohorts]
Example #8
0
    def all_cohorts(self):
        """Retrieve all students with the cohort name"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            select c.Id,
            c.Name
            from Cohort c
            """)

            all_cohorts = db_cursor.fetchall()

            [print(s) for s in all_cohorts]
Example #9
0
    def all_cohorts(self):
        """Retrieve all cohorts with the cohort name"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            SELECT c.Id,
                   c.Name
            FROM Cohort c
            """)

            all_cohorts = db_cursor.fetchall()

            for cohort in all_cohorts:
                print(cohort)
Example #10
0
    def all_cohorts(self):
        """Retrieve all cohorts"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            select c.cohort_id,
                c.cohort_name
            from Cohort c
                """)

            all_cohorts = db_cursor.fetchall()

            for cohort in all_cohorts:
                print(cohort)
    def all_cohorts(self):
        """Retrieve all students with the cohort name"""

        with sqlite3.connect(self.db_path) as conn:

            conn.row_factory = lambda cursor, row: Cohort(row[1])

            db_cursor = conn.cursor()

            db_cursor.execute("""
           select c.cohortId, c.name
            from cohorts c
            order by c.cohortId
            """)

            all_cohorts = db_cursor.fetchall()

            for cohort in all_cohorts:
                print(cohort)
    def all_cohorts(self):
        """Retrieve all cohorts"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])
            db_cursor = conn.cursor()

            db_cursor.execute("""
            SELECT Id,
                Name
            FROM Cohort
            ORDER BY Id
            """)

            all_cohorts = db_cursor.fetchall()

            print("****COHORTS****")
            [print(c) for c in all_cohorts]
            print("----------------------------------------")
    def all_cohorts(self):
        """Retrieve all cohorts with the cohort name"""

        with sqlite3.connect(self.db_path) as conn:
            conn.row_factory = lambda cursor, row: Cohort(row[1])

            db_cursor = conn.cursor()

            db_cursor.execute("""
                select c.cohort_id, c.name
                from Cohorts c
                order by c.cohort_id
            """)

            all_cohorts = db_cursor.fetchall()
            print("Cohorts")
            print("==========")
            # comprehension:
            [print(c) for c in all_cohorts]
            print("")
Example #14
0
def all_cohorts(self):
    """Retrieve all cohort names"""

    with sqlite3.connect(self.db_path) as conn:
        conn.row_factory = lambda cursor, row: Cohort(row[1], row[2], row[3],
                                                      row[5])
        db_cursor = conn.cursor()

        db_cursor.execute("""
            select s.Id,
                s.first_name,
                s.last_name,
                s.slack_handle,
                s.cohort_id,
                c.name
            from Student s
            join Cohort c on s.cohort_id = c.Id
            order by s.cohort_id
            """)
        all_students = db_cursor.fetchall()

        for student in all_students:
            print(student)
Example #15
0
# Once you have defined all of your custom types, go to main.py, import the classes you need, and implement the following logic.

# Create 4, or more, exercises.
# Create 3, or more, cohorts.
# Create 4, or more, students and assign them to one of the cohorts.
# Create 3, or more, instructors and assign them to one of the cohorts.
# Have each instructor assign 2 exercises to each of the students.

create_list = Exercise("Create list", "Python")
create_dictionary = Exercise("Create dictionary", "Python")
create_tuple = Exercise("Create tuple", "Python")
create_set = Exercise("Create set", "Python")
comprehensions = Exercise("Comprehensions", "Python")
functions = Exercise("Functions", "Python")

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)
Example #16
0
Create 4, or more, exercises.
Create 3, or more, cohorts.
Create 4, or more, students and assign them to one of the cohorts.
Create 3, or more, instructors and assign them to one of the cohorts.
Have each instructor assign 2 exercises to each of the students.
"""

# Creating exercises
paint_the_fence = Exercise("Paint The Fence","JavaScript")
sand_the_floor = Exercise("Sand The Floor", "JavaScript")
paint_the_house = Exercise("Paint The House", "JavaScript")
wax_on = Exercise("Wax On", "Python")
wax_off = Exercise("Wax Off", "Python")

# Creating cohorts
day_cohort_98 = Cohort("Day Cohort 98")
cobra_kai = Cohort("Night Cohort Cobra Kai")
miyagi_dojo = Cohort("Day Cohort Miyagi Dojo")

# Creating students and assigning them to cohorts with .append()
daniel_larusso = Student("Daniel", "LaRusso", "Daniel-san", "Day Cohort Miyagi Dojo")
miyagi_dojo.students.append(daniel_larusso)
johhny_lawrence = Student("Johnny", "Lawrence", "L3g5w33p3r", "Night Cohort Cobra Kai")
cobra_kai.students.append(johhny_lawrence)
john_doe = Student("John", "Doe", "DoeBoi", "Day Cohort 98")
day_cohort_98.students.append(john_doe)
janet_doe = Student("Janet", "Doe", "DammitJanet", "Day Cohort 98")
day_cohort_98.students.append(janet_doe)

# Checking that students are in their cohorts
# print(cobra_kai.students[0].first_name)
Example #17
0
from exercise import Exercise
from student import Student
from cohort import Cohort
# from instructor import Instructor

# Creating Exercises
chickenMonkey = Exercise("ChickenMonkey", "Python")
urbanPlanner = Exercise("Urban Planner", "Python")
kennel = Exercise("Kennel", "JavaScript")
welcomeToNashville = Exercise("Welcome to Nashville", "HTML")

# Creating Cohorts
cohort36 = Cohort("Day Cohort 36")
cohort37 = Cohort("Day Cohort 37")
cohort20 = Cohort("Evening Cohort 20")

# Creating Students

adam = Student("Adam", "Byrd", "ajbyrd", cohort36)
sophia = Student("Sophia", "Hoffman", "sophiahoffman", cohort36)
corri = Student("Corri", "Golden", "corrigolden", cohort37)
sully = Student("Sullivan", "Pierce", "sullypierce", cohort20)
Example #18
0
from cohort import Cohort
from exercise import Exercise
from instructor import Instructor
from student import Student


# Create 4 or more exercises
methods_review = Exercise("Methods Review", "Python")
classes_practice = Exercise("Practice Making Classes", "Python")
face_space = Exercise("Facespace Social Media", "React")
sleepster = Exercise("Sleepster Media Streaming", "Javascript")

# Create 3 or more cohorts
cohort_44 = Cohort("Cohort 44: The Awesome")
cohort_103 = Cohort("Cohort 103: The Brave")
cohort_113 = Cohort("Cohort 113: The Perseverant")

# Create 4 or more students, and assign them to a cohort
me = Student("Luke", "Esworthy", "lukeesworthy")
you = Student("Jim", "Bob", "JimboRox")
siri = Student("Siri", "Robot", "heysiri")
alexa = Student("Alexa", "Hola", "heyalexa")

me.cohort = "cohort_44"
you.cohort = "cohort_113"
siri.cohort = "cohort_44"
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")
Example #19
0
planner = Exercise()
planner.name = "Planner"
planner.exercise_language = "Python"

english_idioms = Exercise()
english_idioms.name = "English Idioms"
english_idioms.exercise_language = "Python"

multiple_inheritances = Exercise()
multiple_inheritances.name = "Multiple Inheritances"
multiple_inheritances.exercise_language = "Python"

# Create 3, or more, cohorts.

cohort_35 = Cohort()
cohort_35.name = "Cohort 35"
cohort_35.cohort_students = list()
cohort_35.cohort_teachers = list()

cohort_36 = Cohort()
cohort_36.name = "Cohort 36"
cohort_36.cohort_students = list()
cohort_36.cohort_teachers = list()

cohort_37 = Cohort()
cohort_37.name = "Cohort 37"
cohort_37.cohort_students = list()
cohort_37.cohort_teachers = list()

# Create 4, or more, students and assign them to one of the cohorts.
Example #20
0
from instructor import Instructor
from student import Student

# Once you have defined all of your custom types, go to main.py, import the classes you need, and implement the following logic.

# Create 4, or more, exercises.
# Create 3, or more, cohorts.
# Create 4, or more, students and assign them to one of the cohorts.
# Create 3, or more, instructors and assign them to one of the cohorts.
# Have each instructor assign 2 exercises to each of the students.

exercise1 = Exercise("exercise1", "javascript")
exercise2 = Exercise("exercise2", "python")
exercise3 = Exercise("exercise3", "html")
exercise4 = Exercise("exercise4", "css")
cohort1 = Cohort("cohort1")
cohort2 = Cohort("cohort2")
cohort3 = Cohort("cohort3")
student1 = Student("John", "Doe")
student1.cohort = cohort1
student2 = Student("Jane", "Doe")
student2.cohort = cohort2
student3 = Student("Jill", "Doe")
student3.cohort = cohort3
instructor1 = Instructor("Doe", "John")
instructor1.cohort = cohort1
instructor2 = Instructor("Doe", "Jane")
instructor2.cohort = cohort2
instructor3 = Instructor("Doe", "Jill")
instructor3.cohort = cohort3
Example #21
0
from student import Student
from cohort import Cohort
from exercise import Exercise
from instructor import Instructor

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)
from cohort import Cohort
from exercise import Exercise
from instructor import Instructor
from student import Student

exercise_one = Exercise("Exercise One", "Python")
exercise_two = Exercise("Exercise Two", "Python")
exercise_three = Exercise("Exercise Three", "C#")
exercise_four = Exercise("Exercise Four", "C#")

cohort_one = Cohort("C37")
cohort_two = Cohort("C38")
cohort_three = Cohort("C39")
cohort_four = Cohort("C40")

student_one = Student("Jim", "Simmons", "@JimmySimms", cohort_one)
student_two = Student("Barb", "Wyer", "@BarbWyer", cohort_two)
student_three = Student("John", "Legend", "@LegendofJohn", cohort_three)
student_four = Student("Mack", "Williams", "@MackyWilly", cohort_four)

bryan_nilsen = Instructor("Bryan", "Nilsen", "@bnilsen", cohort_two, "high-fives")
andy_collins = Instructor("Andy", "Collins", "@andycollins", cohort_two, "sarcasm")
kristen_norris = Instructor("Kristen", "Norris", "@knorris", cohort_two, "correction other instructors' errors")
jisie_david = Instructor("Jisie", "David", "@jisiedavid", cohort_two, "spreading the positive attitude")
chase_fite = Instructor("Chase", "Fite", "@chasefite", cohort_two, "helping out students")

bryan_nilsen.assignExercise(exercise_one, student_one)
bryan_nilsen.assignExercise(exercise_four, student_one)

andy_collins.assignExercise(exercise_two, student_two)
andy_collins.assignExercise(exercise_three, student_two)
Example #23
0
from student import Student
from instructor import Instructor
from cohort import Cohort
from exercise import Exercise

cohort_1 = Cohort('Day 36')
cohort_2 = Cohort('Evening 12')
cohort_3 = Cohort('Evening 13')

exercise_1 = Exercise('Chicken Monkey', 'Javascript')
exercise_2 = Exercise('Daily Journal', 'Javascript')
exercise_3 = Exercise('Pizza', 'Python')
exercise_4 = Exercise('Student Exercises', 'Python')

student_1 = Student('Manila', 'Bui')
student_2 = Student('Matt', 'Blagg')
student_3 = Student('Ryan', 'Cunningham')
student_4 = Student('Corri', 'Golden')

instructor_1 = Instructor('Joe', 'Shepherd')
instructor_2 = Instructor('Jisie', 'David')
instructor_3 = Instructor('Jenna', 'Solis')

students = [student_1, student_2, student_3, student_4]
instructors = [instructor_1, instructor_2, instructor_3]

for student in students:
    student.set_cohort(cohort_1)

for instructor in instructors:
    instructor.set_cohort(cohort_1)
from student import Student
from instructor import Instructor
from cohort import Cohort
from exercise import Exercise

# Create 4, or more, exercises.

python_lists = Exercise("lists", "python")
python_dictionaries = Exercise("dictionaries", "python")
python_tuples = Exercise("tuples", "python")
python_sets = Exercise("sets", "python")

# Create 3, or more, cohorts.

cohort_38 = Cohort(38)
cohort_37 = Cohort(37)
cohort_36 = Cohort(36)

# Create 4, or more, students and assign them to one of the cohorts.

alyssa_nycum = Student("Alyssa", "Nycum", "alyssanycum")
john_long = Student("John", "Long", "johnlong")
onterio_wright = Student("Onterio", "Wright", "onteriowright")
katie_wohl = Student("Katie", "Wohl", "katiewohl")

cohort_38.students.append(alyssa_nycum)
alyssa_nycum.cohort = cohort_38.name
cohort_38.students.append(katie_wohl)
katie_wohl.cohort = cohort_38.name
cohort_37.students.append(onterio_wright)
onterio_wright.cohort = cohort_37.name
from student import Student
from instructor import Instructor
from exercise import Exercise
from cohort import Cohort

kandy_korner = Exercise("Kandy Korner", "Python")
stocks_report = Exercise("Mushroom Picker", "Python")
planet_list = Exercise("Planet List", "React")
mushroom_picker = Exercise("Mushroom Picker", "Javascript")
star_wars = Exercise("Star Wars", "C+")

c40 = Cohort("C40")
e11 = Cohort("E11")
c42 = Cohort("E42")

stephen = Student("Stephen", "Castaneda", "stephencastaneda")
davis = Student("Davis", "Lindell", "davislindell")
sarah = Student("Sarah", "Holder", "sarahholder")
david = Student("David", "Everett", "davideverett")
zane = Student("Zane", "Bliss", "zanebliss")

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")
from student import Student
from cohort import Cohort
from instructor import Instructor
from exercise import Exercise

# Exercises
cash_to_coins = Exercise("Cash To Coins", "Python")
nutshell = Exercise("Nutshell", "JavaScript")
english_idioms = Exercise("English Idioms", "Java")
planet_list = Exercise("Planet List", "C#")

# Cohorts
cohort40 = Cohort("Cohort 40")
cohort41 = Cohort("Cohort 41")
cohort42 = Cohort("Cohort 42")

# Students
daniel_meza = Student("Daniel", "Meza", "C40 Channel", cohort40)
brandy_antonio = Student("Brandy", "Antonio", "C41 Channel", cohort41)
harvey_mendoza = Student("Harvey", "Mendoza", "C42 Channel", cohort42)
jesus_vazquez = Student("Jesus", "Vazquez", "C40 Channel", cohort40)

# Instructors
joe_shepherd = Instructor("Joe", "Shepherd", "C40 Channel", "Cohort 40",
                          "JavaScript")
bryan_nilsen = Instructor("Bryan", "Nilsen", "C41 Channel", "Cohort 41", "C#")
madi_pepper = Instructor("Madi", "Pepper", "C42 Channel", "Cohort 42",
                         "Python")

# Assigning students to cohort
cohort40.setStudents([daniel_meza, jesus_vazquez])
Example #27
0
from student import Student
from instructor import Instructor
from exercise import Exercise
from cohort import Cohort
from nss_person import NSS_Person

students = []

minecraft = Exercise("Minecraft", "Javascript")
bank_account = Exercise("Bank Account", "C#")
capstone = Exercise("Capstone", "Javascript")
snake = Exercise("Snake Game", "Python")
fizz_buzz = Exercise("FizzBuzz", "Python")

C37 = Cohort("Day Cohort 37")
C38 = Cohort("Day Cohort 38")
C40 = Cohort("Day Cohort 40")

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")
Example #28
0
Create 3, or more, cohorts.
Create 4, or more, students and assign them to one of the cohorts.
Create 3, or more, instructors and assign them to one of the cohorts.
Have each instructor assign 2 exercises to each of the students.
'''
from cohort import Cohort
from exercise import Exercise
from instructor import Instructor
from student import Student

exercise_one = Exercise("Intro", "Python")
exercise_two = Exercise("Lists", "Python")
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)
Example #29
0
from student import Student
from instructor import Instructor
from cohort import Cohort
from exercise import Exercise

# Create 4, or more, exercises.

exercise1 = Exercise("Universe Creation", "Python")
exercise2 = Exercise("Lego Ledger", "React")
exercise3 = Exercise("Dream Diary", "JavaScript")
exercise4 = Exercise("Goal Getter", "Python")
# Create 3, or more, cohorts.

cohort35 = Cohort("Cohort 35")
cohort36 = Cohort("Cohort 36")
cohort37 = Cohort("Cohort 37")

# 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")
Example #30
0
from student import Student
from instructor import Instructor
from cohort import Cohort
from exercise import Exercise

lists = Exercise("Lists", "Python")
dictionaries = Exercise("Dictionaries", "Python")
tuples = Exercise("Tuples", "Python")
sets = Exercise("Sets", "Python")
debugging_python = Exercise("Debuggin", "Python")

cohort_37 = Cohort("Cohort 37")
cohort_38 = Cohort("Cohort 38")
cohort_39 = Cohort("Cohort 39")
cohort_40 = Cohort("Cohort 40")

william = Student("William", "Green", "William Green", "Cohort 37")
andrew = Student("Andrew", "Green", "Andrew Green", "Cohort 38")
michael = Student("Michael", "Carroll", "Michael Carroll", "Cohort 39")
roxanne = Student("Roxanne", "Nasraty", "Roxanne Nasraty", "Cohort 40")

jisie = Instructor("Jisie", "David", "Jisie David", "Cohort 38", "So cheery")
kristen = Instructor("Kristen", "Norris", "Kristen Norris", "Cohort 38",
                     "Sticking with us until the end")
bryan = Instructor("Bryan", "Nilsen", "Bryan Nilsen", "Cohort 40",
                   "High fives")

jisie.assign_student_exercise(william, lists)
jisie.assign_student_exercise(andrew, dictionaries)
kristen.assign_student_exercise(michael, tuples)
kristen.assign_student_exercise(roxanne, sets)