Question

In: Computer Science

Task: Craps is a popular game played in casinos. Design a program using Raptor Flowcharts to...

Task: Craps is a popular game played in casinos. Design a program using Raptor Flowcharts to play a variation of the game, as follows:

Roll two dice. Each dice has six faces representing values 1, 2, 3, 4, 5, and 6, respectively. Check the sum of the two dice. If the sum is 2, 3, or 12(called craps), you loose; if the sum is 7 or 11(called natural), you win; if the sum is another value(i.e., 4, 5, 6, 8, 9, or 10), a point is established. Continue roll the dice again, if the same point value is rolled, you win, otherwise, you loose. Please use Raptor Flowcharts to make the program

Your program should allow user play as many runs as wanted and display each run status and result. And display total number of runs user played and number of runs user won.

Here is a sample output:

Run 1:

You rolled 5 + 6 = 11

You Win!!!

Run 2:

You rolled 1 + 3 = 4

Point is 4, you have another try to win this run.

Rolled Again 2 + 4 = 6

You loose

Run 3:

You rolled 4 + 4 = 8

Point is 8, you have another try to win this run.

Rolled Again 2 + 6 = 8

You win!

Run 4:

You rolled 6 + 6 = 12

You loose

Total Runs: 4

User Won 2 of the 4 runs.

Solutions

Expert Solution

Please combine screenshot....

/*****************output*************/

Run 1
You rolled 6 2
Point is: 8, you have another try to win this run.

Rolled Again 6+1=7
You loose

Run 2
You rolled 2 3
Point is: 5, you have another try to win this run.

Rolled Again 1+2=3
You loose

Run 3
You rolled 4 4
Point is: 8, you have another try to win this run.

Rolled Again 2+2=4
You loose

Run 4
You rolled 4 1
Point is: 5, you have another try to win this run.

Rolled Again 5+3=8
You loose

Run 5
You rolled 5 4
Point is: 9, you have another try to win this run.

Rolled Again 6+4=10
You loose

Run 6
You rolled 1 4
Point is: 5, you have another try to win this run.

Rolled Again 6+4=10
You loose

Run 7
You rolled 4 4
Point is: 8, you have another try to win this run.

Rolled Again 2+5=7
You loose

Run 8
You rolled 6 +5
You Win

Run 9
You rolled 5 5
Point is: 10, you have another try to win this run.

Rolled Again 1+6=7
You loose

Run 10
You rolled 5 1
Point is: 6, you have another try to win this run.

Rolled Again 5+1=6
You Win

Run 11
You rolled 5 1
Point is: 6, you have another try to win this run.

Rolled Again 4+6=10
You loose

Run 12
You rolled 4 1
Point is: 5, you have another try to win this run.

Rolled Again 4+3=7
You loose

Total run 12
User Won 2 of the 12 runs.
----Run complete. 185 symbols evaluated.----

Please let me know if you have any doubt or modify the answer, Thanks :)


Related Solutions

Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will...
Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will randomly pick a color from Red, Green, Blue, Orange, Yellow, and Purple, and you will be asked to predict the program's selection before it is revealed. The program should ask the user to enter the color the computer has selected. The program should ensure user enters only one of the six colors. After user has entered his or her guess, the program should display...
Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will...
Design a program using Raptor Flowcharts that tests your ESP, or extrasensory perception. The program will randomly pick a color from Red, Green, Blue, Orange, Yellow, and Purple, and you will be asked to predict the program's selection before it is revealed. The program should ask the user to enter the color the computer has selected. The program should ensure user enters only one of the six colors. After user has entered his or her guess, the program should display...
For this assignment, write a program that uses functions to simulate a game of Craps. Craps...
For this assignment, write a program that uses functions to simulate a game of Craps. Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the dice will determine whether the player (and anyone that has placed a bet) wins immediately, loses immediately, or if the game continues. If the sum of the first roll of the dice (known as the come-out roll) is equal to 7 or 11, the player...
1. In the game of blackjack as played in casinos in Las Vegas, Atlantic City, Niagara...
1. In the game of blackjack as played in casinos in Las Vegas, Atlantic City, Niagara Falls, as well as many other cities, the dealer has the advantage. Most players do not play very well. As a result, the probability that the average player wins a hand is about 0.29. Find the probability that an average player wins A. twice in 5 hands. Probability = B. 11 or more times in 26 hands. Probability = There are several books that...
The game of roulette is popular in many casinos around the world. In Las Vegas, a...
The game of roulette is popular in many casinos around the world. In Las Vegas, a typical roulette wheel has the numbers 1–36 in slots on the wheel. Half of these slots are red, and the other half are black. In the United States, the roulette wheel typically also has the numbers 0 (zero) and 00 (double zero), and both of these are on the wheel in green slots. Thus, there are 38 slots on the wheel. The dealer spins...
Outcomes in roulette. One game that is popular in many American casinos is roulette. Roulette is...
Outcomes in roulette. One game that is popular in many American casinos is roulette. Roulette is played by spinning a ball on a circular wheel that has been divided into 38 arcs of equal length; these bear the numbers 00, 0, 1, 2, . . . , 35, 36. The number on the arc at which the ball comes to rest is the outcome of one play of the game. The numbers are also colored in the following manner: Red:...
Discuss with the class the importance of program design (using pseudocode and/or flowcharts) when designing programs...
Discuss with the class the importance of program design (using pseudocode and/or flowcharts) when designing programs utilizing selection structures.
Overview For this assignment, write a program that uses functions to simulate a game of Craps....
Overview For this assignment, write a program that uses functions to simulate a game of Craps. Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the dice will determine whether the player (and anyone that has placed a bet) wins immediately, loses immediately, or if the game continues. If the sum of the first roll of the dice (known as the come-out roll) is equal to 7 or 11, the...
Must be done with the Program Raptor Program #2 - Area of Shapes Design a superclass...
Must be done with the Program Raptor Program #2 - Area of Shapes Design a superclass called Shape that contains two functions—getVolume() and getInput(). The getVolume and getInput functions in the Shape class will simply return 0, you will derive from them in your subclasses mentioned below. Define 3 subclasses of the Shape class—Sphere, Cube, and Cone. The sphere class will need a radius field, the cube class will need a length field, and the cone class will need radius...
Write a program in Python to simulate a Craps game: 1. When you bet on the...
Write a program in Python to simulate a Craps game: 1. When you bet on the Pass Line, you win (double your money) if the FIRST roll (a pair of dice) is a 7 or 11, you lose if it is ”craps” (2, 3, or 12). Otherwise, if it is x ∈ {4, 5, 6, 8, 9, 10}, then your point x is established, and you win when that number is rolled again before ’7’ comes up. The game is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT