2016-09-29 44 views
0

我有一个任务,我必须使用Python代码来模拟公司的每小时平均最大客户量。家庭作业提示说要导入随机模块并使用random.random()方法。我的问题是,我不知道该把函数本身放进去。这里是我到目前为止的代码:公司的Python模拟

import random 

#Function to calculate the average maximum of customers per hour 

def ave_max_calc(C, H, D): 

    **HELP** 


print('Hello, welcome to my average maximum hourly customer volume calculator!') 

C = int(input('Give the number of customers per day: ')) 
H = int(input('Give the number of business hours per day: ')) 
D = int(input('Give the number of days to simulate: ')) 

print('The average maximum hourly customer volume is: ', ave_max_calc(C,H, D)) 
+0

最后,一个至少试图做某事的学生。尝试阅读此https://docs.python.org/3/tutorial/controlflow.html – thesonyman101

+0

首先要做的是明确无误地定义您的术语,计算将遵循这些定义。 – pjs

回答