File tree 1 file changed +13
-5
lines changed 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 6
6
dl = []
7
7
8
8
# Check Blackjack__________________________________________
9
- def BlackJack (s ):
9
+ def check_Twenty_One (s ):
10
10
if s == 21 :
11
11
return True
12
12
else :
@@ -68,8 +68,13 @@ def playersTurn(s):
68
68
69
69
s = check_sum (s )
70
70
71
- if (BlackJack (s )):
72
- print ("Hurray......It's a BLACKJACK....You Won\n " )
71
+ if (check_Twenty_One (s )):
72
+ #Check Blackjack_______________________________________
73
+ if len (pl ) == 2 :
74
+ print ("Hurray......It's a BLACKJACK....You Won\n " )
75
+ #Check if player made 21_______________________________
76
+ else :
77
+ print ("Awesome!!!......You made 21!....You Won\n " )
73
78
return 2
74
79
elif (Bust (s )):
75
80
print ("You got Bust.....You Lost\n " )
@@ -123,8 +128,11 @@ def playersTurn(s):
123
128
print (f"\n Dealer's current hand: { dl } \n " )
124
129
125
130
s = check_sum (s )
126
- if (BlackJack (s )):
127
- print ("Dealer got a BlackJack and won the Game\n You Lost\n " )
131
+ if (check_Twenty_One (s )):
132
+ if len (dl ) == 2 :
133
+ print ("Dealer got a BlackJack and won the Game\n You Lost\n " )
134
+ else :
135
+ print ("Dealer made 21 and won the Game\n Better Luck Next Time!\n " )
128
136
break
129
137
elif (Bust (s )):
130
138
print ("Dealer got Busted\n You Won\n " )
You can’t perform that action at this time.
0 commit comments