Question: BlockPy: #47.3) Total Dogs In the time since the first question, your dog picture company has boomed even further. You have now hired over a

BlockPy: #47.3) Total Dogs

In the time since the first question, your dog picture company has boomed even further. You have now hired over a hundred employees. There is a file available named "employees.json", which contains a list of dictionaries, each of which represents an employee. Use the load function of the json module and the open built-in function to access the data in this file, in order to calculate the total number of "Dog Pictures Made" by your employees. You should use the Sum pattern.

BlockPy: #47.4) Max on Other Field

You are so pleased with your employees, you have decided to promote one. There is a file available named "employees.json", which contains a list of dictionaries, each of which represents an employee. Use the load function of the json module and the open built-in function to access the data in this file to find the employee with the highest sales record. You should follow the Max pattern previously seen, but you will need to modify it in order to find the "Name" of the employee with the highest "New Sales".

Tip: Start by calculating the the maximum of the "New Sales"field. Now, what additional information do you need to store in order to print the final result?

The JSON file for both is the same; this is some of it: "

[ { "Name": "Victor Martinez", "New Sales": 320, "Salary": 26400, "ID": 1, "Dog Pictures Made": 200, "Position": "Armed forces logistics/support/administrative officer" }, { "Name": "David Kidd", "New Sales": 120, "Salary": 11600, "ID": 2, "Dog Pictures Made": 220, "Position": "Engineer, manufacturing systems" },"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!