()
| 57 | return |
| 58 | |
| 59 | def dealer_choice(): |
| 60 | if sum(d_cards) < 17: |
| 61 | while sum(d_cards) < 17: |
| 62 | random.shuffle(deck) |
| 63 | d_cards.append(deck.pop()) |
| 64 | |
| 65 | print("Dealer has total " + str(sum(d_cards)) + " with the cards ", d_cards) |
| 66 | |
| 67 | if sum(p_cards) == sum(d_cards): |
| 68 | print("***************The match is tie !!****************") |
| 69 | return |
| 70 | |
| 71 | if sum(d_cards) > 21: |
| 72 | print("**********************Player is winner !!**********************") |
| 73 | return |
| 74 | |
| 75 | if sum(d_cards) > sum(p_cards): |
| 76 | print("***********************Dealer is the Winner !!******************") |
| 77 | else: |
| 78 | print("**********************Player is winner !!**********************") |
| 79 | |
| 80 | # Player turn |
| 81 | while sum(p_cards) < 21: |
no test coverage detected