Question: A call to the hotPotato function using 7 as the counting constant returns Susan. please attach output also? from pythonds.basic.queue import Queue 1 2 3

 A call to the hotPotato function using 7 as the counting

A call to the hotPotato function using 7 as the counting constant returns Susan.

please attach output also?

from pythonds.basic.queue import Queue 1 2 3 def hotPotato (namelist, num): simqueue = Queue() for name in namelist: simqueue.enqueue (name) while simqueue.size > 1 for i in range (num): 9 10 simqueue.enqueue (simqueue.dequeue)) simqueue.dequeue) 12 13 14 15 16 return simqueue.dequeue ) L print (hotpotato (["Bill", "David", "Susan", "Jane","Kent", "Brad"],7))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!