so is it possiable of you can explain bit more, how i would display the hands.
thanks
User Profile
Collapse
-
ok, a bit confused, dont understand how i would start it, thanksLeave a comment:
-
black jack
yeh thanks, after few changes it is now wroking, is there a way of how i would display total hands played, at the end of game, for both computer and playerLeave a comment:
-
black jack
thnaks for ur help with updating the score, it now works, but i have two main problem, firstly how would i now get the ace to be 1 and 11, and a way of displaying the total hands played at the end of the game.
thanks for the help
below is my code,
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] player=[] computer=[]
Leave a comment:
-
blackjack
hey. i dont think you seem to understand. i've done my own code and would rather stick to how it is, i appreciate u writing ur own version of the code but i would rather stick with mine, and jus fix the 'hit' function. you say i can fix it by creating a function to calculate the total, how would i do that?
thanks.Leave a comment:
-
blackjack
ok so it is not updating because the total itself is not updating. do you know how i can change it so the total updates?
thanks.Leave a comment:
-
blackjack
I added in what you told me to bvdet, and i get no errors, but when i 'hit', another card is not dealt and it still comes up with the previous total.
here is my code now:
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] player=[] computer=[] random.shuffle(deck) #this will shuffle the cards in the deck nextCard = 0 player.append(deck[nextCard])
Leave a comment:
-
blackjack
thanks for your post, which may be helpful for other parts of my code, however my main problem is getting the "hit" function to work, as it is not working at the moment. have a look previous posts in this thread, and then could you be able to help me fix the "hit"?
thanks once again.Leave a comment:
-
blackjack
i have tried the second option, but does not seem to work.
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] player=[] computer=[] random.shuffle(deck) #this will shuffle the cards in the deck nextCard = 0 player.append(deck[nextCard]) nextCard += 1 player.append(deck[nextCard]) # nextCard is now 1. nextCard
Leave a comment:
-
blackjack
thanks for ur help before "boxfish" , i was able, proceed and pretty much complete my blackjack code. however, i have come across a minor problem, my hit function does not seem to work. do you know how i can fix this. also, does anyone know how i can fit a re-run code into my program too?
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] player=[] computer=[]
Leave a comment:
-
blackjack
ok thanks no i dont have no erros,, but how would i display the players hand, computers hand.
below is how the code looks now, but, would have to keep the code commeted out, as that think would display the, hands.
thanks for help
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10,11]*4 player=[] computer=[] random.shuffle(deck)
Leave a comment:
-
blackjack
hi, i am making black jack code, but i am stuck, i have made start, but for reason gettin errors, which i dont seem be able to fix, below is my code wht i started.
Code:import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10,11]*4 player=[] computer=[] #r = random.randint computer.append(random.randint(deck)) player.append(random.randint(deck)) computer.append(random.randint(deck))
-
hi, does anyone, know the forums, email address or contanct details , i found this one "privacy@bytes. com" but does not seem to work, as i sent emails, and does seem to be a valid email address keeps failing to be sent .Leave a comment:
-
-
i played the game, it is pretty good, is this the complete code.Leave a comment:
-
would do u mean by "At this time, there is no check for "blackjack" or "natural" (a total of 21 in your first two cards)."Leave a comment:
-
-
ok thanks, when you have time, please do so, i am very greatful, for your help.Leave a comment:
-
thanks for ur help, but the code, above, is bit counfusing, as it runs, how do i actually play it,Leave a comment:
-
blackjack
if you can just help me with this code, i be very much obliged, with this black jack code, it which works, fine, but how do i get the Aces count as 1 or 11. belwo is the code, which is allready made, how and were would i add in the new aces code.
Code:import random as r deck = [2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]*4 computer = [] player = [] c = 'y' #Clear works
Leave a comment:
No activity results to display
Show More
Leave a comment: