- 1

can anyone help me in writing queue application program

in real life call centers use queues to hold people calling them in an order until a call representative is free"?

17th May 2020, 5:48 PM
Sriram
2 Antworten
+ 2
We can give you some hints, but first of all you have to do a try by yourself. If you have done so, please put it in playground and link it here. If you get stuck, you can come back with more specific questions. Thanks!
17th May 2020, 6:16 PM
Lothar
Lothar - avatar
0
#Here is my code,if you need any calrification about any statement added, let me know: class CallCenter: def __init__(self): self.customers = [] def is_empty(self): return self.customers == [] def add(self, x): self.customers.insert(0, x) def next(self): return self.customers.pop() c = CallCenter() while True: n = input() if n == 'end': break c.add(n) #your code goes here time=0 while c.is_empty()==False: a=c.next() if a=="general": time+=5 else: time+=10 print(time)
21st Sep 2021, 11:08 PM
Hasnae BOUHMADY
Hasnae BOUHMADY - avatar