File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Advanced-Questions/02-call-center/Python Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ def get_time(m):
2727
2828
2929def get_int (m ):
30+ """ this function only accept numbers ! """
3031 while True :
3132 x = input (m )
3233 try :
@@ -38,6 +39,7 @@ def get_int(m):
3839
3940
4041def get_day (m ):
42+ """ this function only accept number that between 0 -7 day of the week """
4143 while True :
4244 x = input (m )
4345 try :
@@ -55,6 +57,7 @@ def get_day(m):
5557
5658
5759def gete_users ():
60+ """ this function take users and replace them in structure like json response """
5861 x = input ("Enter Number Of Users: " )
5962 try :
6063 x = int (x )
@@ -74,12 +77,9 @@ def gete_users():
7477 return users
7578
7679
77- def get_4_percetage (n ):
78- return 4 * 100 / n
79-
8080
8181def calculate_price (users ):
82-
82+ """ this function calculate price of each call """
8383 for each in users :
8484 # check time and date
8585 each ["price" ] = (each ["pules" ] * 46 )
@@ -97,6 +97,8 @@ def calculate_price(users):
9797 each ["price" ] = each ["price" ] + (4 * each ["price" ] / 100 )
9898
9999 return users
100+
101+
100102def main ():
101103 users = gete_users ()
102104 prices = calculate_price (users )
You can’t perform that action at this time.
0 commit comments