Question: You are working on a project that requires analyzing data from a fictional e- commerce website. The data is stored in two lists, 'users'

You are working on a project that requires analyzing data from a fictional e- commerce website. The data is stored in two lists, 'users' and 'purchases', where 'users' contains information about the users of the website, and 'purchases' contains information about the purchases made by those users. Each entry in the 'users' list is a dictionary with the following keys: 'user_id' (integer), 'name' (string), 'email' (string), and 'address' (string). Each entry in the 'purchases' list is a dictionary with the following keys: 'user_id' (integer), 'product_id' (integer), and 'price' (float). Write a Python program that analyzes the data and performs the following tasks: i. Calculate the total revenue generated from all purchases. ii. Find the user who made the most purchases. iii. Determine the total revenue generated from each product.
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
The detailed ... View full answer
Get step-by-step solutions from verified subject matter experts
