Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE PYTHON Design and implement an application that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and

USE PYTHON

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago