Slot Machine Simulation A slot machine is a gambling device the user insert money into and then pulls a lever or presses

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Slot Machine Simulation A slot machine is a gambling device the user insert money into and then pulls a lever or presses

Post by answerhappygod »

Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 1
Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 1 (63.31 KiB) Viewed 34 times
Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 2
Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 2 (63.31 KiB) Viewed 34 times
Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 3
Slot Machine Simulation A Slot Machine Is A Gambling Device The User Insert Money Into And Then Pulls A Lever Or Presses 3 (49.45 KiB) Viewed 34 times
Slot Machine Simulation A slot machine is a gambling device the user insert 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 of money, which the slot machine dispenses back to the user. Design a modular program that simulates a slot machine. When the program runs, it should do the following: • Ask the user to enter the amount of money he or she wants to insert into the slot machine. • Instead of displaying images, the program will randomly select words from the list below. Overall, your program will select three words, from the list, per turn: Grapes, Oranges, Berries, Bells, Melons, Bars • Display the player winnings according to these rules If none of the three randomly selected words match, the program will inform the user that he or she has won: $0. If two of the randomly selected words match, the program will inform the user that he or she has won 1.5 times the amount entered, and display the dollar amount won. If three of the randomly selected words match, the program will inform the user that he or she has won four times the amount entered, and display the dollar amount won.. . The program will ask whether the user wants to play again or cash out. If the user enters any letter other than "C", repeat the steps to play again. If the user enters "C" then display the output below and end the program: . The total dollar amount of money the player has bet the entire time they have been playing • The total dollar amount of money the player has won the entire time they have been playing. Example of required output These are example numbers and your program should work with any amount of money played or won.:
Total Amount Bet: $100.00 Total Amount Won: $125.00 Other Requirements Your solution must use at least the TWO FUNCTIONS defined below, but you may use more. You are welcome to use other MODULES in your code in addition to the required functions. Required Functions: • Function #1 Create a function to get a single randomly selected word from the word list specified above. The function should return the selected word as text. For example: "Grapes" • Function #2 Create a function to calculate the amount the player has won. The function should accept two arguments, described below, and return the amount of money won. o The amount of money bet o The number of fruit types that matched.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply