Question: I am having a hard time with this programming problem and was wondering what the complete code would look like. Design and implement an application

I am having a hard time with this programming problem and was wondering what the complete code would look like.

Design and implement an application that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and printed side by side. Print the appropriate statements (see below) if all three of the numbers are the same (Jackpot!!!), or if any two of the numbers are the same (Matched 2!!). Continue playing until the user chooses to stop.

Begin your script with the following 2 lines:

import random #import the random module random.seed(2) #dictates random sequence Python Slot Machine 0 1 1 Matched 2!! Play again (y)?: Python Slot Machine 5 2 4 Sorry you lost! Play again (y)?: Python Slot Machine 4 9 3 Sorry you lost! Play again (y)?: Python Slot Machine 9 0 9 Matched 2!! Play again (y)?: Python Slot Machine 2 6 6 Matched 2!! Play again (y)?: Python Slot Machine 8 5 8 Matched 2!! Play again (y)?: Python Slot Machine 7 8 4 Sorry you lost! Play again (y)?: Python Slot Machine 0 0 5 Matched 2!! Play again (y)?: Thanks for playing! 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!