I am learning Python at the moment and I am liking it, so after finishing the collection course and the Dungeon Game I wanted to test my skills with a BlackJack game.
Here is my code so far:
I have tested it on my terminal in my virtual environment and I would say it is doing fine.I have added what I will need to do next as comments at the bottom.
Please test it and let me know if you find any bugs that I have missed!! THANKS
Blackjack Training Simulator Practice Optimal Strategy The fully responsive simulator can be accessed from a desktop or most modern mobile devices, which effectively means – if you have an internet connection – you’ll be able to learn anywhere. Python -i blackjack.py let me call main at the end of my code. And either you need to download the repo. Or copy the code from my repo. Coz i added some new.
Also, as you may remember Kenneth Love , I have asked you about global variables in Python yesterday and the question was because of this project:
I have to use a few: 4 if I have counted correctly.I have thought (actually still think) that I need those because I will have to use them a lot in the code.
But if there is a better way to do this (which I am pretty sure there is :) ), feel free to let me know.
Instead of selecting a card and then removing it as its own step, why not just
.pop() the first occurrence of the card's value?
Awesome work, though! Great to see people come up with brand new creations!
Right, pop is surely needed here.I was wondering about that also because now I don't want to waste the card value as I need it later to check the stats.
good to see you often around the forum
Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.
Just a simple console blackjack game. The bread and butter code was written with lots of comments, so you can improve on it. Really, the most important part is figuring out when an ace is 11 in value and when it is a 1 in value, so you don't bust.
Blackjack Strategy Simulator7,327 Views
Web keno. Can you actually assign values e.g king'queen, I am having trouble displaying the values of the cards.
Python Blackjack Simulator
Python Blackjack Simulator Download
We're a friendly, industry-focused community of1.20 million developers, IT pros, digital marketers,and technology enthusiasts learning and sharing knowledge.