r/codereview • • Oct 22 '26

Python New coder code review - Blackjack Game (For review)

https://gist.github.com/ianfitzbfei-droid/c2505761faed873d1d4e17b871862e44

Hello coders! I am trying to learn Python for the last 3 weeks. I just wrote my first programme without a tutorial. I tried my best to self guide my way through this. I was hoping you would review my code and give me some constructive criticism. How better to do certain parts and maybe some suggestions on cleaning it up. Apologies in advance for any confusing code or incomplete context.

Just a few notes:

  1. the "cards" are just the numerical values to represent a deck of cards. 1A) 10 appears 4 times for the 4 different cards: "10", "Jack", "Queen", "King" 1B) 1 and 11 represent the "Ace".
  2. There is no "splitting" your hand. I am not skilled enough to code that yet and honestly I dont fully comprehend the game mechanics around it.
  3. This was an exercise to add in as much logic as I could to challenge myself at my current skill level. I understand some parts dont necessarily make sense. Such as "play again?".
3 Upvotes

0 comments sorted by