Solution: Create a Dictionary and Replace Key-value Pairs
Learn how to create a dictionary containing students' names and scores and then replace the scores with the total and average scores.
We'll cover the following...
We'll cover the following...
The solution to the problem of creating a dictionary that contains students’ names and scores, and then replacing the scores with the total and average scores is given below.
Solution
Explanation
- Lines 1–5: We create a dictionary
studentsthat contains