Write a class program getHand/tutorialoutletdotcom
FOR MORE CLASSES VISIT tutorialoutlet Add a Hand(object) class to the Card and Deck classes in the template. The __init__ has been written for you. Write a class program getHand() which will assign cards from the deck to the hand and remove those cards from the deck so they cannot be used again. See the output below for details on how it should look. Write a class program sneakPeek() which will allow you to see the hand from the topmost card (the last dealt) to the bottommost (the first dealt). Write an __iter__ and next for the Hand class used by sneakPeek().
★
★
★
★
★
67 views • 3 slides