figure queue implementation of hot potatowhile sim_queue size( for in range(num)sim_queue enqueue(sim_queue dequeue()sim_queue dequeue(return sim_queue dequeue(print(hot_potato(["bill""david""susan""jane""kent""brad"] )note that in this example the value of the counting constant is greater than the number of names in the list this is not problem since the queue acts like circle and counting continues back at the beginning until the value is reached alsonotice that the list is loaded into the queue such that the first name on the list will be at the front of the queue bill in this case is the first item in the list and therefore moves to the front of the queue variation of this implementationdescribed in the exercisesallows for random counter simulationprinting tasks more interesting simulation allows us to study the behavior of the printing queue described earlier in this section recall that as students send printing tasks to the shared printerthe tasks are placed in queue to be processed in first-come first-served manner many questions arise with this configuration the most important of these might be whether the printer is capable of handling certain amount of work if it cannotstudents will be waiting too long for printing and may miss their next class consider the following situation in computer science laboratory on any average day about students are working in the lab at any given hour these students typically print up to twice during that timeand the length of these tasks ranges from to pages the printer in the lab is oldercapable of processing pages per minute of draft quality the printer could be switched to give better qualitybut then it would produce only five pages per minute the slower printing speed could make students wait too long what page rate should be used basic data structures