subject

Python write a function named "json average" that takes a json formatted string as a parameter in the format of an array of objects where each object has keys "mass", "density", "temperature", and "velocity" and each key maps toa floating point number. this function should return the average "mass" of all the objects in the array as a json string in the format ["mass: ) 1 import json 2 def json_average(x): counte sum-e array json. loads(x) 4 6 for i in array("density"): count +1 sum +arrayti] 9 return sum/count submit for practice error on input ['if"density: 556.84, "mass": 98.04, "temperature: -19.28, velocity": 58.37), f"density": 385.28, "mass": 1.16, "temperature": 9.24, "velocity 29.36), ["density": 237.16, "mass": 84.12, "temperature": -19.09, "velocity: 92.55), f"density": 872.85, "mass": 19.03, "temperature": 2.31, "velocity": 28.96)11: 'list

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
Sam is a data analyst at an advertising firm. he often uses a spreadsheet that contains media ratings details. he would like to filter the spreadsheet data based on different filter criteria. which operators can he use to specify the combination of filter criteria? sam can use the ( blank ) operators to specify a combination of filter criteria.
Answers: 3
question
Computers and Technology, 22.06.2019 12:40
How do i get the most points, without any effort?
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
question
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
You know the right answer?
Python write a function named "json average" that takes a json formatted string as a parameter in th...
Questions
question
Physics, 30.01.2020 20:51
Questions on the website: 13722363