Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python please include comments Question 2. Write a function called UsersByPurchase Date that returns a 10 list of unique users for all users who purchased

python please include comments image text in transcribed
image text in transcribed
Question 2. Write a function called UsersByPurchase Date that returns a 10 list of unique users for all users who purchased at least one item on a given date. UsersByPurchase Date(users, date) . Arguments: users - object/list of dictionaries, date - string Return: 10 list - [userID,...) Test your function using the provided groceries.json file. Your function should not open the groceries file. Sample for testing: '06-25-2014' should return a list of 2 users. Bb https Manuel Write a function cal Lab 36 Review Submission.... View Run Kernel Tabs Settings Help Nu X BB stax (1) gro X nex x Unix 2D, X Nuix Filter Notebooks/ sipynb _Jupyter_L.. Applied.ipy... Basics.pynb In_Noteboo... root: 0) 100 items 0: trips: 1) 7 items 0: date: "26-05-2014" items: 1) 13 items date: "09-13-2015" items: () 12 items 2: 3: 5: 6: userID: "4875" 1: 2: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: Saving completed groceries.json Question 2. Write a function called UsersByPurchase Date that returns a 10 list of unique users for all users who purchased at least one item on a given date. UsersByPurchase Date(users, date) . Arguments: users - object/list of dictionaries, date - string Return: 10 list - [userID,...) Test your function using the provided groceries.json file. Your function should not open the groceries file. Sample for testing: '06-25-2014' should return a list of 2 users. Bb https Manuel Write a function cal Lab 36 Review Submission.... View Run Kernel Tabs Settings Help Nu X BB stax (1) gro X nex x Unix 2D, X Nuix Filter Notebooks/ sipynb _Jupyter_L.. Applied.ipy... Basics.pynb In_Noteboo... root: 0) 100 items 0: trips: 1) 7 items 0: date: "26-05-2014" items: 1) 13 items date: "09-13-2015" items: () 12 items 2: 3: 5: 6: userID: "4875" 1: 2: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: Saving completed groceries.json

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago