From the course: Intermediate Python for Non-Programmers
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Solution: JSON - Python Tutorial
From the course: Intermediate Python for Non-Programmers
Solution: JSON
- [Instructor] So what we're ultimately looking to do in this challenge is make sure that you've got a good grasp on JSON and how to get the information out of JSON that you want. So for us, we are trying to get the first test score from a list of students. So let's go ahead and look at this string that is representing the JSON for our course information here. So we notice, we ultimately have a list of a bunch of students. There's Nick, Jane, Mark, and they each have four test scores, but we want the first test score from each of these. So we're going to have to do some work to go through and loop through each of the students and grab the correct test score. So let's go ahead and move down here where we are filling out this function, get_scores. You'll notice you already have a variable first test scores and that ultimately gets returned, but right now it's just an empty list. We need to put in the proper test scores…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.