Question
Write a code using Python: Lottery Number Generator) that we will build on to make a game. As the book describes, generate random numbers in
Write a code using Python:
Lottery Number Generator) that we will build on to make a game. As the book describes, generate random numbers in the range 0 through 9 and store them in a List
Start the player with 100 chips. Ask them how many they want to bet (must be in the range 1 through 10). Once you have their bet amount, give them the following choices:
Pick 1 (Put 3 numbers in List (0 through 9, duplicates are ok), they pick one number, if they match one of the numbers they win the amount of their bet, along with getting their bet back)
Pick 2 (Put 3 numbers in a List, they pick 2 numbers, if they match both they win twice the amount of their bet, along with getting their bet back)
Jumbo (Put 7 numbers in a List, they pick 7 numbers, they win a lot (you choose amount) if they match all 7, they win almost that amount if they match 6, a bit less if they match 5, a bit less if they match 4, and finally they win something if they match 3 (matching less than 3 is a loss))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started