Student Becomes the Teacher
Use what you've learned so far to manage your own class.
StartStudent Becomes the Teacher
Lesson 1 of 1
- 1Welcome to this “Challenge Course”. Until now we’ve been leading you by the hand and working on some short and relatively easy projects. This is a challenge so be ready. We have faith in you! …
- 2Great work!
- 3Now lets put the three dictionaries in a list together. my_list = [1, 2, 3] The above example is just a reminder on how to create a list. Afterwards, my_list contains 1, 2, and 3.
- 4Excellent. Now you need a hard copy document with all of your students’ grades. animal_sounds = { “cat”: [“meow”, “purr”], “dog”: [“woof”, “bark”], “fox”: [], } print animal_sounds[“cat”] …
- 5When teaching a class, it’s important to take the students’ averages in order to assign grades. 5 / 2 # 2 5.0 / 2 # 2.5 float(5) / 2 # 2.5 The above example is a reminder of how division works…
- 6Great! Now we need to compute a student’s average using weighted averages. cost = { “apples”: [3.5, 2.4, 2.3], “bananas”: [1.2, 1.8], } return 0.9 * average(cost[“apples”]) + \ 0.1 * aver…
- 7Great work! Now let’s write a get_letter_grade function that takes a number score as input and returns a string with the letter grade that that student should receive.
- 8Good! Now let’s calculate the class average. You need to get the average for each student and then calculate the average of those averages.
- 9Awesome! You’re doing great. Now let’s use the functions you’ve created to check on the grade of the class overall.