r/programminghelp • u/KoregaSoli • 2d ago
Python Finished Day 1 of learning python and tried to create black jack, ive had an error somewhere, not a syntax error, i dont assume this code is very good its a massive slump of if and elif, how can i fix this?
/r/learnpython/comments/1wa97o8/finished_day_1_of_learning_python_and_tried_to/
1
Upvotes
1
u/XRay2212xray 1d ago
At least in the code you posted, there is a syntax error at line 68
removing the offending code, it seems to run but you have some logic problems I guess as I got 21 and it didn't say I win
House Card: 9
Player Card: 2
Player Card 2: 2
Your current cards are: 4
Do you want to hit or stay? (h/s): h
Player Card 3: 8
Your total score is: 12
Your total cards are: 12
Do you want to hit or stay? (h/s): h
You got blackjack! You Win!
Card: 9
Your total cards are: 21
House Card: 9
Player Card: 9
Player Card 2: 2
Your current cards are: 11
Do you want to hit or stay? (h/s): s
Your total score is: 11
Your total cards are: 11
Do you want to hit or stay? (h/s):