Student Becomes the Teacher
Lesson 1 of 1
1. 1
Welcome 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! …
2. 3
Now 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.
3. 4
Excellent. 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”] …
4. 5
When 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…
5. 6
Great! 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…
6. 7
Great 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.
7. 8
Good! Now let’s calculate the class average. You need to get the average for each student and then calculate the average of those averages.
8. 9
Awesome! You’re doing great. Now let’s use the functions you’ve created to check on the grade of the class overall.