1 00:00:00,000 --> 00:00:03,270 We defined this function in the previous lectures, 2 00:00:03,810 --> 00:00:07,230 which is able to calculate the mean of a list. 3 00:00:07,320 --> 00:00:13,650 However, what happens if instead of passing a list 4 00:00:13,651 --> 00:00:18,630 as inputs, we pass a dictionary, so student_grades 5 00:00:18,660 --> 00:00:23,026 is the dictionary here. Let's see what's going to happen. 6 00:00:23,027 --> 00:00:26,800 [Author typing] 7 00:00:26,801 --> 00:00:29,730 Well, it says an unsupported operand type. 8 00:00:29,731 --> 00:00:33,150 So an error will occur with the sum function 9 00:00:33,151 --> 00:00:36,300 because it will try to add up strings and 10 00:00:36,301 --> 00:00:39,930 integers, and this function is not designed to 11 00:00:39,931 --> 00:00:42,900 process dictionaries. It's designed to process 12 00:00:42,901 --> 00:00:46,260 lists. So how can we make this function to process 13 00:00:46,261 --> 00:00:50,280 both lists and dictionaries? We can do that using 14 00:00:50,400 --> 00:00:54,720 conditionals. Let's see how to do that in the next videos. 15 00:00:54,721 --> 00:00:58,699 [Outro sound]