- 1

How would i get it right to make 21blackjack in py

3rd Dec 2021, 10:26 AM
Liam Rogers
Liam Rogers - avatar
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
3rd Dec 2021, 10:44 AM
Rik Wittkopp
Rik Wittkopp - avatar
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
6th Dec 2021, 8:39 AM
Liam Rogers
Liam Rogers - avatar
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)
6th Dec 2021, 8:44 AM
Liam Rogers
Liam Rogers - avatar
0
And if the card are higher than 21 print bust
6th Dec 2021, 8:45 AM
Liam Rogers
Liam Rogers - avatar
- 1
Need help
3rd Dec 2021, 10:27 AM
Liam Rogers
Liam Rogers - avatar