Write a script that simulates a casino machine

Assignment Help MATLAB Programming
Reference no: EM13168103

Write a script that simulates a casino machine. To play a single round on the machine user pays $ 5. Now when the user start the machine, the machine rolls a pair of dice (simulate both dice with help of random number generator) and user only wins if the same number appears on both the dice. The user wins money equal to 2 times the number on the either dice (EX. If both dice show 4 user will earn back 4*2= 8$....If one dice show 3 and other dice 5 user will earn 0$ as numbers as different). Simulate 4 rounds on the machine by a user and calculate the final winnings or loss of the user.

Reference no: EM13168103

Questions Cloud

Using netbeans, use repetition to display a table of values : Using Netbeans, use repetition to display a table of values showing x, the square of x and the cube of x. X is to go up to 5.
When we sort a list of items, we need a basis : When we sort a list of items, we need a basis on which to compare the items to see whether one is bigger than another. If it's a list of numbers, Python just compares the numeric values; if it's a list of strings, Python compares the strings alpha..
The heating element of a water heater in an apartment : The heating element of a water heater in an apartment building has a maximum power output of 28 kW. Four residents of the building
We can combine assignment statements : We can combine assignment statements, for-loops, and if statements to perform a wide range of tasks with lists. Suppose we have a bookstore with each book defined as follows: Book = namedtuple('Book', 'author title genre year price instock') , wher..
Write a script that simulates a casino machine : Write a script that simulates a casino machine. To play a single round on the machine user pays $ 5. Now when the user start the machine, the machine rolls a pair of dice (simulate both dice with help of random number generator) and user only wins..
A computer has a cache, main memory, and a disk : A computer has a cache, main memory, and a disk. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache (called cache miss)
A computer has a cache, main memory, and a disk : A computer has a cache, main memory, and a disk. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache (called cache miss)
The computer game function collision : The computer game function collision () checks whether two circular objects collide; it returns True if they do and False otherwise. Each circular object will be given by it's radius and the (x,y) coordinates of it's center.
A firewall works by blocking incoming : A firewall works by blocking incoming requests. Explain how a firewall can distinguish between two incoming requests allowing one while denying the other??

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Develop a well-structured function

Develop a well-structured function to compute v as a function of t. Then use this function to generate a table of v versus t for t = -5 to 50 at increments of 0.5.

  Give the gradient operator in paraboloidal coordinates

Given that the le data.txt contains only real numbers seperated by white space, write down a sequence of maple commands that will read the data into a maple list and then plot a histogram of the elements in the list.

  Coding(using for and while loop)

coding(using for and while loop)

  Generate a sphere of diameter 3. create 3 vectors

Generate a sphere of diameter 3. Create 3 vectors representing the translation of this sphere along the x, y, and z axes. Generate the correct vectors given the description below: The sphere should be translated to (-10, -10, -10).

  Determine the optimal linear predictor

Determine the optimal linear predictor for a given order N and DPCM simulation and write a graphical user interface that has least the following functions

  Matlab: create a function that will use the secant method

MATLAB: Create a function that will use the Secant method

  Create an animation of a square

create an animation of a square according to the directions below. Create a square with a side length of 3 with the square centered at (5,5). Translate this square along a cosine wave on the interval [0, 6*pi].

  First ten numbers of the sequence of pseudorandom numbers

write a program that gives the first ten numbers of the sequence of pseudorandom numbers

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  Matlab program to compute how much money will accumulate

Write a MATLAB program to compute how much money will accumulate in 5 years in the account and in any CDs you buy. Run the program for two different savings interest rates: 4 percent and 5 percent.

  Let''s combine everything together

Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd