I would like to know how to return
cardn
back into the
__init___
part of my program, where I can continue. This is in a class.
'''the dealing'''
while card_count != 2:
deal = random.randint(1,13)
self.card_check(deal)
print(cardn)
card_count += 1
def card_check(self, card):
if card == 1:
cardn = "Ace"
elif card == 11:
cardn = "Jack"
elif card == 12:
cardn = "Queen"
elif card == 13:
cardn = "King"
return cardn
All I want is the name of the card.
Easy! Just write