so currently im working on a function that checks if a user/computer has a blackjack in my black jack game however i noticed that when using an
if condition and condition
if one condition is met the entire statment is true even though that shouldnt be the case when using
and
am i doing something wrong ? here is the function:
def check_for_jack():
#user has jack
if 'ace' and "king" in user_deck:
print('You have a black jack, You win')
elif'ace' and "queen" in user_deck:
print('You have a black jack, You win')
elif 'ace' and "jack" in user_deck:
print('You have a black jack, You win')
elif 'ace' and "ten" in user_deck:
print('You have a black jack, You win')
#computer has jack
elif 'ace' and "king" in computer_deck:
print('Computer has a black jack, You lose')
elif'ace' and "queen" in computer_deck:
print('Computer has a black jack, You lose')
elif 'ace' and "jack" in computer_deck:
print('Computer has a black jack, You lose')
elif 'ace' and "ten" in computer_deck:
print('Computer has a black jack, You lose')
to further explain what i mean
user_deck = ['jack', 'one']
since there is only a jack nothing should happen instead i get
"You have a black jack, you win