Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Slot Machine Objective: Work with if statements and random numbers. Instructions: A slot machine is a device that the user inserts money into and then
Slot Machine Objective: Work with if statements and random numbers. Instructions: A slot machine is a device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount that the slot machine dispenses back to the user Create a flowchart and then a Python application that simulates a slot machine. When the app executes, it should do the following . Asks the user to enter the amount of money he or she wishes to enter into the slot machine. 2. Instead of displaying images, have the program display the name of the image. The program must randomly select a word from the following list Cherries, Oranges, Plums, Bells, Melons, Bars To select a word, the program can generate a random number in the range f 0 to 5. If the number is 0, the selected word is Cherries, if the number is 1, then the selected word is Oranges, and so forth. The program should randomly select a word from the list 3 times and display all 3 of the words. 3. If none of the randomly selected words match, the program informs the user that he or she has won $0. If 2 of the words match, the program informs the user of the amount won which is 4 times the amount entered that he or she has won. If all 3 of the words match, the program informs the user that he or she has hit the jackpot and has won 10 times the amount entered. Requirements The app should be named Slot Submit flowchart and Python app through the assignment tool in Canvas. Include comments defining the purpose of the code. Caution: Each student must create his/her own independent program
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