+ 2

Queue python

Once Again i need your Help, i have a little problem, this is the question asked: *** You are making a call center application, which should handle customers in a queue. The CallCenter class is implemented as a Queue. Each element of the queue has the topic of the call as its value. The two possible values are 'general' and 'technical'. A 'general' call takes on average 5 minutes to handle, while a 'technical' call requires 10 minutes. The given code adds multiple customers to the Queue from user input. You need to dequeue all added customers, calculate and output the total time required to handle all calls. *** and this is my code: https://code.sololearn.com/c3KU0SBEG34w but it doesnt work as it should. There are 4 test case scenarios, 1,2 and 4 are working. but scenario 3 doesnt work, and i cant see what the problem is because the resuult is hidden. thanks for your help!

18th Jan 2022, 11:05 AM
Ramiz Besic
Ramiz Besic - avatar
2 Respostas
+ 4
When all input are same type then it may raise error of g or t are referenced before assignment.. try g,t=0,0
18th Jan 2022, 11:19 AM
Jayakrishna 🇮🇳
- 1
yes, this was the problem. Thanks!
18th Jan 2022, 11:34 AM
Ramiz Besic
Ramiz Besic - avatar