PART 2: Open an XML file for writing and write data to that file as follows: Jane Doe CENT 12 John Doe PHYS 10.0 Bill Gates ICS 7 Part 3: Add a function that takes a list of floats and returns the...


Do the following parts of this lab


PART 2:<br>Open an XML file for writing and write data to that file as follows:<br><?xml version=
Jane Doe CENT 12 John Doe PHYS 10.0 Bill Gates ICS 7 Part 3: Add a function that takes a list of floats and returns the average value. Use the function to add the average exam score for each student in the XML file. import json filename = input ("Enter name of file: ") infile - open (filename, "r") # Read the file object into a python dictionary students_d = json.load (infile) print(students_d) infile.close () "/>
Extracted text: PART 2: Open an XML file for writing and write data to that file as follows: Jane Doe CENT 12 John Doe PHYS 10.0 Bill Gates ICS 7 Part 3: Add a function that takes a list of floats and returns the average value. Use the function to add the average exam score for each student in the XML file. import json filename = input ("Enter name of file: ") infile - open (filename, "r") # Read the file object into a python dictionary students_d = json.load (infile) print(students_d) infile.close ()
Lab 14: Processing a json file<br>Read in a JSON file such as the following:<br>{<br>

Extracted text: Lab 14: Processing a json file Read in a JSON file such as the following: { "students" : [ %3D "firstName" : "Jane", "lastName" : "Doe", "major" : "CENT", "credits" : 12, "exams" : [92.7, 91.4, 95.2] }, { "firstName" "lastName" : "Doe", "major" : "credits" : 10.0, : "John", "PHYS", "exams : [91.1, 81.3, 85.6] }, { "firstName" : "Bill", "lastName" "major" : "ICS", "credits" : 7, : "Gates", "exams" : [98.7, 94.4, 96.4] PART 1: Parse the JSON data into a dictionary and output the data as follows: Jane Doe is majoring in CENT John Doe is majoring in PHYS Bill Gates is majoring in ICS
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here