1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nataly [62]
3 years ago
15

Write a function named "json_filter" that takes a JSON formatted string as a parameter in the format of an array of objects wher

e each object has keys "mass", "density", "temperature", and "velocity" and each key maps to a floating point number. This function should return the input as a JSON string in the same format but with only the objects with velocity greater than 38.46
Computers and Technology
1 answer:
7nadin3 [17]3 years ago
7 0

Answer:

Check the explanation

Explanation:

kindly check the well written code below to get the solution to your question.

import json

def json_filter(input_string):

   jsonFormat = json.loads(input_string)

   result = []

   for obj in jsonFormat:

       if obj["temperature"] > 38.46:

           result.append(obj)

   return json.dumps(result)

You might be interested in
Hello! Please Answer This One Question!<br><br>Write a 50-word summary about Digital Citizenship
zloy xaker [14]

Answer:

The term digital citizenship, also known as e-citizenship or cyber-citizenship, refers to the use of Information and Communication Technologies (ICT), and the principles that guide them, for the understanding of the political, cultural and social issues of a nation.

More Content by Concept

In other words, it is about citizen participation through digital or electronic environments and interfaces, through the Internet and Social Networks.

Digital citizenship is part of the electronic government system or digital democracy, which precisely consists of the administration of State resources through new ICTs and all their potential, to make life easier for citizens.

In this way, a digital citizen has the right to access information online in a safe, transparent and private way, in addition to the social and political participation that 2.0 media allows.

Explanation:

6 0
3 years ago
The ListCell subclass’s ________ method creates the custom presentation. This method is called by the ListView’s cell factory wh
Vlada [557]

Answer:

A

Explanation:

Update

The listview can be called an arbitrary amount of times, different items may be passed and the cell can go from empty to non-empty and the other way round. ListView creates about as many cells as you see on screen and fills them with items. E.g. scrolling or modifications of the items list or resizing of the ListView can result in updates.

7 0
3 years ago
Insurance can help you:a. minimize monthly expenses
KIM [24]
This is an easy answer sure in the back of your mind u knew it was b good luck :).

4 0
3 years ago
What is another word for violation
serg [7]

Answer:

Infringement

Explanation:

The others are incorrect

4 0
3 years ago
Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), and will
dedylja [7]

Answer:

celciusFile=open("celcius.dat","r")

fahrenheitFile=open("fahrenheit.dat","w")

# Iterate over each line in the file

for line in celciusFile.readlines():

# Calculate the  fahrenheit

   fahrenheit = 9.0 / 5.0 * float(line) + 32

#write the  Fahrenheit values to the  Fahrenheit file

   fahrenheitFile.write("%.1f\n" % fahrenheit)

# Release used resources

celciusFile.close()

fahrenheitFile.close()

Explanation:

<em></em>

<em>celciusFile=open("celcius.dat","r") </em>

<em>fahrenheitFile=open("fahrenheit.dat","w") </em>

open the Celsius file in the read mode and assign it to a variable.

open the  Fahrenheit file in the write mode and assign it to a variable.

read mode means you can only use/read the content in the file but cannot alter it.

write mode means you can write new data to the file.

<em> </em>

<em />

  • <em># Iterate over each line in the file </em>

<em>for line in celciusFile.readlines(): </em>

The values contained in the Celsius file are collected.

  • <em># Calculate the  fahrenheit </em>

<em>    fahrenheit = 9.0 / 5.0 * float(line) + 32 </em>

The values are then converted to Fahrenheit.

  • <em>#write the  Fahrenheit values to the  Fahrenheit file</em>

<em>    fahrenheitFile.write("%.1f\n" % fahrenheit) </em>

The Fahrenheit values are written to the  Fahrenheit file

<em>%.1f</em><em>  is used to specify the number of digits after decimal. and </em><em>\n </em><em>adds a new line.</em>

<em />

  • <em># Release used resources </em>

<em>celciusFile.close() </em>

<em>fahrenheitFile.close() </em>

All files are closed

<em />

5 0
3 years ago
Other questions:
  • What type of graphic organizer will help jane compare the results of a student survey about teachers at her school?
    15·2 answers
  • What term identifies the physical interface between a computer and its peripherals?
    5·1 answer
  • count multiples(num1, num2, AND) Description: Returns the number of multiples of N that exist between num1 and num2 inclusive. P
    12·1 answer
  • What is distribution hardware?
    14·1 answer
  • If a web address is written as http://www.mywebprescence.com/index.html: What part of this address is considered to be the webpa
    8·1 answer
  • Given the 8-bit binary code 10011011, what is the equivalent decimal value?
    5·1 answer
  • Modify theme in excel
    5·1 answer
  • How i simplify this boolean expression ?A'.B'.C'+A'.B'.C+A'.B.C+A.B'.C+A.B.C
    6·2 answers
  • I don't know what to do for these two questions
    13·1 answer
  • Understanding that protection of sensitive unclassified information is:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!