Coders Packet

Blackjack in Python

By Sudepta Mallick

a Simple blackjack Game. To win the game player must have a twenty-one or closer to a twenty-one scorecard. Can generate random Card from the deck.

Project: Blackjack Game in Python

  • Can Generate Random Name from Name File.
  • Can Play a Blackjack game.
  • txt is a names File used in-game file and random name generator file.
  • Can Generate 52 cards of a deck.
  • Can generate random Card from the deck.
  • King, Queen, Jack Cards have 10 Score
  • Ace Can Have 1 or 11 Value Depend on individual
  • Start Amount is ₹10000

Blackjack Gameplay:

  1. Betting Minimum and maximum limits: 2 to 500
  2. When Player Place the bet, the dealer gives you two cards.
  3. If the player's first two cards are ace and ten-card, this is a natural or "Blackjack". If the dealer doesn't, the dealer pays the player 1.5 times the betting amount. If the dealer has natural and the player doesn't then the dealer immediately collects the bet amount. If the dealer and player got natural then the player takes back his chips.
  4. The player must decide whether to "stand" (not ask for another card) or "hit" (ask for another card in an attempt to get closer to a count of 21, or even hit 21 exactly). Thus, a player may stand on the two cards originally dealt with them, or they may ask the dealer for additional cards, one at a time, until deciding to stand on the total (if it is 21 or under), or goes "bust" (if it is over 21).
  5. When the dealer has served the player, the dealer's face-down card is turned up. If the total is 17 or more, it must stand. If the total is 16 or under, they must take a card. The dealer must continue to take cards until the total is 17 or more, at which point the dealer must stand. If the dealer has an ace, and counting it as 11 would bring the total to 17 or more.


  • To win the game, you must have a 21 or closer to 21 scorecard.
  • Natural Gives 1.5 amount of betting (Depend on luck)

Note: Unzip File in one Folder in order to play the game.

Software Used: Pycharm Community edition 2020.3.5




Download Complete Code


No comments yet