- 1
How would i get it right to make 21blackjack in py
5 Antworten
+ 2
Liam Rogers
You will need to provide a bit more detail before you can get useful help.
Please show your code attempt, describe the rules of the game,(blackjack varies everywhere) and the specifics of the problem you have
0
I need the program to choose two random cards out of the deck and if the cards have a higher score than mine.print you lose or if my pick is higher print u win
0
import realnumber
import random
rmadom = random.randint(1, 13)
card_deck1 = ["A", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "J", "Q">
card_deck2 = ["A", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "J", "Q">
com_input1 = card_deck1[int(random)]
com_input2 = card_deck2[int(random)]
user_input1 = card_deck1[pick1]
user_input2 = card_deck2[pick2]
pick1 = int("enter your first card")
pick2 = int("enter your second card")
print(user_input1 + user_input2)
print(com_input1 + com_input2)
0
And if the card are higher than 21 print bust
- 1
Need help