Question: Crazy Monkey is a recent startup started by the 3 friends from IIT Delhi. The company deals with apparel and trending millennium clothing and accessories.

Crazy Monkey is a recent startup started by the 3 friends from IIT Delhi. The company deals with apparel and trending millennium clothing and accessories.
The company wants to expand across India through an online web market and various offline stores. Still, before taking this step, they wanted to be double sure regarding the demand and the sector they should target. The company has a limited cash reserve and they want to utilize it in the best possible way.
The company has hired you as an External Data Analyst and wanted you to help them with the following questions:
You are given a dictionary that consists of various orders that were placed. Each order consists of the customer_id as the key of the dictionary with the values consisting of another dictionary. For each customer, you have been provided with the details of the customer in a dictionary with the name of the customer, email, phone number, and the product ordered by the customer(in a list with the product code).
Orders Dictionary
orders ={'U123':{'name':'Sumit Shukla', 'email':'ss@gmail.com', 'phone':8608538199, 'product':['p1','p2','p5']},'U121':{'name':'Ajay', 'email':'aj@gmail.com', 'phone':7708538199, 'product':['p5','p2','p5']},'U124':{'name':'Vijay', 'email':'vj@gmail.com', 'phone':870853819, 'product':['p1','p2','p3']},'U126':{'name':'Rahul', 'email':'rh_gmail.com', 'phone':8607858189, 'product':['p1','p5','p5']},'U183':{'name':'Shree', 'email':'shree@gmail.com', 'phone':8908938159, 'product':['p1','p1','p1']},'U143':{'name':'shivani', 'email':'shivani@gmail', 'phone':855853019, 'product':['p5','p2','p5']},'U188':{'name':'vidhya', 'email':'vi@hotmail.com', 'phone':6608538169, 'product':['p1','p3','p4']},'U187':{'name':'jaya', 'email':'jm@gmail.com', 'phone':1111111111, 'product':['p3','p2','p5']},'U154':{'name':'ojas', 'email':'oj.com', 'phone':8917755621, 'product':['p1','p2','p2']},'U177':{'name':'anil', 'email':'an@gmail.com', 'phone':7894561230, 'product':['p1','p2','p1']}}
Per_product_cost Dictionary
pp ={'p1':500,'p2':150,'p3':100,'p4':750,'p5':612}
Questions
Find the number of customers in the orders dictionary. (3 Marks)
Find the number of unique products(product code) that we ordered. (3 Marks)
Each email is defined in the following format username@hostname.com, find the customer ids for which the email address was in the wrong format. (4 Marks)
Each phone number is considered valid if it has 10 digits. find the customer ids that have invalid phone numbers. Note: In order to skip filling up the details, some customers have used 1 for 10 times as their phone number. These phone numbers are also considered invalid. (5 Marks)
Which customer has provided both email and phone number as wrong? (non-code)(3 Marks)
Find the count of orders for each product_id. Create a dictionary with the product_id as the key and the number of times the product was ordered. (2 Marks)
Use the dictionary created in the last question to find the product_id which was ordered the maximum number of times. (2 Marks)
You are given the per_product_cost dictionary with the cost of each product. Find the total revenue generated by the company. (5 Marks)
Create a dictionary with the customer_id and total cost ordered by the customer. (2 Marks)
Find the customer_id with the minimum order value. (1 Marks)

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!