Refer to the following code: nCards = 5myList = [‘Jack’, ‘Q…
Refer to the following code: nCards = 5myList = [‘Jack’, ‘Queen’, ‘King’, ‘Ace’, ‘Joker’]def getCard(aList): thisCard = aList.pop() return thisCardfor n in range(nCards): currentCard = getCard(myList) print(currentCard) a) Does the function getCard() remove an element from aList? [a] b) Which card is printed first? [b] c) Could the same card be printed twice in the same program run? [c] d) What would happen if the value of nCards was changed to 7? [d]
Read Details