Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PRINTED/MPRIM 01:03:44 PM ET 18-DEC/DEC-2015 - A lottery ticket is $4. $4.00 - A ticket having 6 different numbers (from 1 to 49) (Can be
PRINTED/MPRIM 01:03:44 PM ET 18-DEC/DEC-2015 - A lottery ticket is $4. $4.00 - A ticket having 6 different numbers (from 1 to 49) (Can be repeated) QUICK PICK / MISE-CLAIR - On a Saturday, they draw the lottery, and the winning numbers are: 111224303243 11,43,24,30,60,43 GUARANTEED PRIZE DRAWI TIRAGE DU LOT GARANTI - Match at each position: 40000430-01 - Match One or Two numbers to get a small prize. (\$10) EVENING / ENCORE PLAYED / SOIRE INSCRIT - Match Three numbers to get a small prize. (\$100) - Matching Four numbers gets a bigger prize. (\$\$1000) - Matching Five is even bigger. (\$5000) - Matching ALL SIX of the numbers you might win millions. (\$5 million in cash) - In the example, we got matches at position 1, 3, 4, 6 (4 numbers) =$1000 saine signatureDmith - [Math Question] What is the possibility of you winning by matching all 6 numbers? - Homework Task: - Write a simple program allows you to buy a ticket with six random numbers, and generate the winning numbers and return what kind of prize you won (one game). - Bonus: imagine you buy up to 100,000 tickets, can you figure out if you actually profit or loss in a long run? mathsisfun.com/data/lottery.html Bramples of the Basic 649 Lottery Program Here is just an example of an implementation of 649 Lottery, you can try something different: - Generate a winning ticket with 6 numbers (from 1 to 49) - Generate a user ticket (either generate randomly or let them enter those numbers) - Try to find out how many numbers are the same. - Based on number of matches, calculate the reward money for the user
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