0% found this document useful (0 votes)
6 views3 pages

Python Code for Customer Analysis

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Python Code for Customer Analysis

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

# def TimeConvert(num):

# return str(num//60) + ':' + str(num%60)

# print(TimeConvert(132))

# # cust = {0: {'Customer\'s Name':'A', 'Email':'Am','Item':'Road-250 Red'},

## 1: {'Customer\'s Name':'B', 'Email':'Bm','Item':'Road-250 Red'},

## 2: {'Customer\'s Name':'A', 'Email':'Am','Item':'Road-250 Red'},

## 3: {'Customer\'s Name':'C', 'Email':'Cm','Item':'Mountain'}}

# class Solution:

# def item(self, cust):

# # Mặc định id ban đầu là 0

# n = len(cust)

# count = 0

# for i in range(n):

# if cust[i]['Item'] == 'Road-250 Red': count+=1

# return count

# def distinctName(self, cust):

# n = len(cust)

# s = {}

# t = set(s)

# for i in range(n):
# if cust[i]['Item'] == 'Road-250 Red':

# [Link](cust[i]['Customer\'s Name'])

# return str(len(t)) + str(t)

# def Purchase(self, cust):

# print(f"Total records: {[Link](cust)}")

# print(f"Distinct customers: {[Link](cust)}")

# Solution().Purchase(cust)

Employees = {0: {'Employ_id':1, 'Name':'Am','Depart':'Road-250 Red', 'salary': 10},

1: {'Employ_id':2, 'Name':'Bm','Depart':'Road-250 Red','salary': 30},

2: {'Employ_id':3, 'Name':'Am','Depart':'Road-250 Red', 'salary': 30},

3: {'Employ_id':4, 'Name':'Cm','Depart':'Mountain', 'salary': 30}}

def Top(E):

L = [Link]()

You might also like