Concept explainers
In the game of craps, a "Pass Line" bet proceeds as follows. The first roll of the two, six-sided dice in a craps round is called the "come out roll." The bet immediately wins when the come out roll is 7 or I I, and loses when the come out roll is 2, 3, or 12. If 4, 5, 6, 8, 9, or 10 is rolled on the come out roll, that number becomes "the point." The player keeps rolling the dice until either 7 or the point is rolled. If the point is rolled first, then the player wins the bet. If the player rolls a 7 first, then the player loses.
Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Absolute C++
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Starting Out with C++ from Control Structures to Objects (8th Edition)
Experiencing MIS
Starting Out with Python (3rd Edition)
Starting Out with C++: Early Objects
- Enter the colour of the baggie you are throwing (red/yellow/blue/green): red red bag lands on yellow ring. Enter the colour of the baggie you are throwing (red/yellow/blue/green): yellow yellow bag lands in hole. Enter the colour of the baggie you are throwing (red/yellow/blue/green): green green bag lands on yellow ring. Enter the colour of the baggie you are throwing (red/yellow/blue/green): blue blue bag lands on yellow ring. User points: 17 Computer points: 9 Congratulations! You won the game by 8 points. Choose 1 or 2 to play one of the following games, or 3 to quit playing 1. Cornhole 2. Guessing Medals 3. Quit Enter your choice: 3 Goodbye. Hope you enjoyed playing! • function guessMedals which asks the user for an integer from 0 to 200 (inclusive), generates a random integer between 50 and 150 (inclusive) and then tells the user what type of medal they have won, depending on how close they came to guessing the number. Medals are awarded as follows:o bronze medal for a guess…arrow_forwardInstallation of a Shopee Billboard Max. score: 100 You are installing a billboard and want it to be at the maximum height. The billboard will have two steel supports, one on each side. The height of each steel bracket must be equal. You have a number of rebar rods that can be welded together. For example, if the bars are of length 1, 2, and 3, they can be welded together to form a length of 6 brackets. Return the maximum possible installation height of the billboard. Return 0 if the billboard cannot be installed.arrow_forwardFlag question Let A = {1, 2, 3, 4, 5, 6, 7} Let B = {3, 4, 5, 6, 7, 8, 9} Let X = 13 Let X=X+|An B| Let X=X+|A U B| What is the mystery number X? Answer:arrow_forward
- Who Wants to Be a Millonalre? You are a contestant on "Who Wants to be a Millionaire?" You already have answered the $250,000 question correctly and now must decide if you would like to answer the $500,000 question. You can choose to walk away at this point with $250,000 in winnings or you may decide to answer the S500,000 question. If you answer the $500,000 question correctly, you can then choose to walk away with $500,000 in winnings or go on and try to answer the $1,000,000 question. If you answer the $1,000,000 question correctly, the game is over and you win $1,000,000. If you answer either the $500,000 or the $1,000,000 question incorrectly, the game is over immediately and you take home "only" $32,000. A feature of the game "Who Wants to be a Millionaire?" is that you have three "lifelines"-namely "50-50," "ask the audience," and "phone a friend." At this point (after answering the $250,000 question), you already have used two of these lifelines, but you have the "phone a…arrow_forwardQuick Quiz: In a machine shop, two cams are produced, one of aluminum (P = 2.7x10 kg/m ) and one of iron (Prer = 7.86x10 kg/m). Both cams have the same volume. Which cam is heavier? %3D %3D (a) The aluminum cam is heavier. (b) The iron cam is heavier. (c) Both cams have the same mass.arrow_forwardUsing python code if the user won or lost the round of hangman. It should also prompt the user if they want to play another round of hangman.arrow_forward
- Q no. 1:Write a code to perform card counting. First you have to evaluate the card whether it is Ace (A),Jack (J), Queen (Q), or King (K). If card is J, Q, and K then points will be 10. If card is Ace thenpoints will be 11. For the rest of the cards points will be the card number e.g. card 3- points willbe 3, card 4 – points will be 4 and so on.Now you have to perform card counting to track card number 10, Jack, Queen and King. Youhave to display “Count has gone up” message if the points is in between 3 and 6. If the points is10 then you will display “Count has gone down”.a) Draw the flow chart of the above program. Also, write pseudo code of the aboveprogram.b) Implement the above code using conditional statements. Also, explain which controlstructure will be best for the above problem.arrow_forwardT=63, n=12 and A=(3,5,8,8,9,16,29,41,50,63,64,67). Draw the corresponding walkthrough as shownarrow_forwardAn argument is expressed in English below. Rhys will go to the beach. If Rhys is excited; then Rhys will go to the beach. Rhys is excited. Variable names are assigned to each English phrase as follows: p: Rhys is excited •q: Rhys will go to the beach Is the argument valid? If valid, then indicate which rule is used for the argument. If invalid, then give truth assignments to the variables that prove the argument is invalid. Pick 4. Check Nextarrow_forward
- One Computer Science program uses the following rules for CS course placement: 1. if the CS AP score is 4 or higher, a student is placed to CS 221, 2. If the CS AP score is less than 4 (0 means no AP) and the ACT math is 24 or higher, a studenet is placed to CS 180, 3. If the CS AP score is less than 4 and the ACT math is lower than 24, a student is placed to CS 170. Write a java program that can print the appropriate courses for each of three cases. A sample output is the following 525 CS221 325 CS180 0 20 CS170 where the first and second colomn are the socre of the AP couse and ACT math, respectively. You must use if-else statement in the code since there exists logical relations between the three cases For example, case 2 and case 3 are both "else" cases with respect to case 1 Remember to comment your code, and follow the Java naming convention.arrow_forwardA robot sits in a 30 foot square room. It be directed to travel a randomly generated distance between 8 and 20 feet. The user will input a value that will serve as the seed for the random number generator. Every foot it travels it indicates that it has traveled 'x feet'. Upon arrival at the user specified distance, it announces." made it!"(This will happen even if the robot moves 0 feet). The program should also indicate how many more feet the robot could travel before running into a wall assuming it always starts at one wall of the room. Note that grammar used to indicate singular versus plural distances. i.e. for an random generation of 5, the resulting output should be: How far should the robot travel? 5 feet 1 foot I made it! I can only travel 25 mor 2 feet 3 feet 4 feet 5 feet e feet. tabs are used to space the output of traveled feet 330492.1753326.qx3zay7 LAB АCTIVITY main.cpp 1 #include 2 using namespace std; 3 4 int main() int roomsize - 30; 6 int distance = 0; 7 8 cout <«…arrow_forwardb. if (score > 25): level 4 score result 19 elif (score >= 15): level 3 25 11 elif (score > 10): 10 level 2 else: level 1arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole