One of the functions I figure I need to make a black jack game:
The function
def card_value_dealer(card_variable):
if card_variable == 'A':
return 11
elif card_variable == 'J' or 'Q' or 'K':
return 10
else:
return card_variable
print(card_value_dealer(7))
In this instance I would expect the function to return 7, but here and for every other parameter value it always returns 10 (except for when the parameter is 'A', then it does return the correct value 11).
Why is this happening?