Using Matlab. Suppose a casino invents a new game that you must pay $250 to play. The game works like this: The
casino draws
random numbers between 0 and 1
from a uniform distribution. It adds them to
gether until
their sum is greater than 1, at which time it stops drawing new numbers. You get a payout of $100 each
time a new number is drawn.
For example, suppose the casino draws 0.4 and then 0.7. Since the sum is greater than 1, it will stop
after the
se two draws, and you receive $200. If instead it draws 0.2, 0.3, 0.3, and then 0.6, it will stop
after the fourth draw and you will receive $40
0. Given the $250 entrance fee, should
you play the
game?
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc%clears screen
clear all%clears history
close all%closes all files
p=250;
M=[];
for i=1:100000
re=0;
S=0;
while(S<=1)
S=S+rand;
re=re+100;
end
M(i)=re;
end
disp('Expected received money is');
mean(M)
disp('Since expcted is greater than what we pay. So, we will
play')
Kindly revert for any queries
Thanks.
Using Matlab. Suppose a casino invents a new game that you must pay $250 to play....
Using Java You are helping a corporation create a new system for keeping track of casinos and customers. The system will be able to record and modify customer and casino information. It will also be able to simulate games in the casino. Customer-specific requirements You can create new customers All new customers have a new customerID assigned to them, starting with 1 for the first, 2 for the second, 3 for the third, ect. New customers have names and monetary...
You are helping a corporation create a new system for keeping track of casinos and customers. The system will be able to record and modify customer and casino information. It will also be able to simulate games in the casino. You may complete this project individually or in a group of no more than 2 other people. Requirements do not change if you choose to complete the project individually or as part of a group. Customer-specific requirements You can create...
You will write a two-class Java program that implements the Game of 21. This is a fairly simple game where a player plays against a “dealer”. The player will receive two and optionally three numbers. Each number is randomly generated in the range 1 to 11 inclusive (in notation: [1,11]). The player’s score is the sum of these numbers. The dealer will receive two random numbers, also in [1,11]. The player wins if its score is greater than the dealer’s...
C or C++ Project Overview Wild, Wild, West! Dice Game The Wild, Wild, West! is an elimination dice game. It can be played by any number of players, but it is ideal to have three or more players. Wild, Wild, West! Requires the use of two dice. At the start of the game, each player receives a paper that will track the number of lives that player has. Each player starts the game with 6 lives. In the first round,...
Requirements: 1. You are not allowed to use global variables. 2. Must declare the following two constants public static final int POINTS = 30; public static final int FORFEIT_POINTS = 20; 3. You can implement your own solution but you are required to break down the problem into smaller pieces. 4. You must provide the output for two rounds of game minimum. 5. Since we are using the Random number generator your output will not be exactly like mine. However,...
Card Game Simulation(in Python 3.8.1) The purpose of this assignment is to help you gain experience using while loops to solve problems. For this assignment, you will simulate a simplified card game that has some similarity to the game of 21. At the start of the program, the user will be asked to supply both the winning score (an integer from 1 thru 21) and the number of times to run the simulation (an integer from 100 to 100,000). To...
Assignment 2 – The two player game of Poaka The game of Poaka is a dice game played by two players. Each player takes turns at rolling the dice. At each turn, the player repeatedly rolls a dice until either the player rolls a 1 (in which case the player scores 0 for their turn) or the player chooses to end their turn (in which case the player scores the total of all their dice rolls). At any time during...
ROLE-PLAY EXERCISE On Command Corporation PROCESS You have been assigned a role in the On Command Corporation case. Please read the general information (Introduction) about the case. Read and understand your role. Your teammates have different roles. Due the situation, you need to work with your team to produce an employee meeting, you have 15 minutes to present the statement and conduct the meeting – see the link attached with information about an employee meeting (you need to create a...
Language: JAVAPart a: Write a class called Geniegotchi with:1. Private data fields: name (of String type, initialized to “Bob”), endurance (of int type, initialized to 4) and happiness (of int type, initialized to 3);2. Public methods:-void setName(String newName) : renames Genie with newName, printsnewName confirmation to screen;void setName(String newName) : renames Genie with newName, printsnewName confirmation to screen;- intgetEndurance() : returns current endurance;-intgetHappiness() : returns current happiness;-void feed() : this method increases current endurance by 1 if endurance is less...
C++ Inheritance Problem Step a: Suppose you are creating a fantasy role-playing game. In this game we have four different types of Creatures: Humans, Cyberdemons, Balrogs, and elves. To represent one of these Creatures we might define a Creature class as follows: class Creature { private: int type; // 0 Human, 1 Cyberdemon, 2 Balrog, 3 elf int strength; // how much damage this Creature inflicts int hitpoints; // how much damage this Creature can sustain string getSpecies() const; //...