Question: Write a Python program that simulates a simple game of 21. Starts by giving the user two random numbers between 1 to 11. Ask the
Write a Python program that simulates a simple game of 21. Starts by giving the user two random numbers between 1 to 11. Ask the user if they want to get another number or stand. If the user takes a random number and the total is over 21, the player automatically loses (bust). Continue the process until the user decides to stand. Then start to randomly giving the computer random numbers, by default the computer must hit as long as the total is less than 17. If the computer bust, the player wins. If not, compare the total for both hands, the one with the higher total wins.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
