your knowledge ming by impler ting a User will start with 3 lives and 100 initial points. Program will ask the user to roll three dices. If sum of three dices is more than or equal to 15, user will get 10 points. Page 2 of 3
Q: 2n sin 7. (a) Multiply the following numbers using the arithmetic in the number system in which they…
A: In this question, we have to multiply given binary(base 2), octal (base 8) and hexadecimal (base 16)…
Q: Question 77 Which of the following are the best examples of smart buildings? (Select 2) O A building…
A: Artificial intelligence Artificial intelligence is another important branch of computer science…
Q: 1. Answer with True or False and explain why. a.) All graphs can have only one possible minimum…
A: Prim’s algorithm is also a Greedy algorithm.
Q: Which of the following is applicable to Dijkstra's algorithm, but not to Prim's algorithm? a. All…
A: The given question are multiple choice selected question
Q: Create House class with the following properties a. floorSize b. noOfFloors C. no OfDoors d.…
A: Program approach:- Property for floorSize. Property for noOfFloors. Property for noOfDoors. Define…
Q: y. which of the follo
A: Solution - In the given question, we have to find out which of the given edges are part of the MST.
Q: For accessing a word from one disk memory: one Seek time and one average rotational delay are…
A: Disk rotates at speed of 500 rotation per sec. That is, 1 sec - 500 rotation x sec - 1 rotation…
Q: Create an interface, Stock derivatives, with two attributes viz., delta=0.5 and vega 0.2 which are…
A: Given The answer is given below
Q: Developers can use npm start to run their node applications. Select one: O True O False package.json…
A: As per our company guidelines we are supposed to answer only first 3 sub-parts. Kindly repost other…
Q: 1. A mission essential function relies on a server running an unsupported OS, which can no longer be…
A: Mission essential functions (MEFs) which refers the limited set of department and agency level…
Q: For the Grammar {S → AS|a, A → SbA|SS|ba construct Leftmost deriyation for the strin
A: Lets see the solution.
Q: 1. Write your own R command for mean and standard deviation in one function. 2. Test your function…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: The Quick Union implementation assumes that the root nodes are assigned a parent ID of “-1". If I…
A: Q: Change line number to change code results
Q: WREG contains the value 0x86. What will be the content of the WREG (in hex notation) and the states…
A: ANSWER:-
Q: Problem 1. Find a regular expression for the language: a) L= {w E {0, 1}*: w has no pair of…
A: The regular expression for the language L = {xyx : x, y ∈ {a, b}*, |x| = 2} and we need to write the…
Q: Live Score Card Ohocse the Team Orocse the Oponent Team Click Who won he Te Tea un Team Weket Batter…
A: Given the live score card. The objective is to create a live scorecard using javaFx.
Q: 4. Does Ethernet provide connection-oriented or connectionless service?
A: Given:
Q: Please solve this...
A: The picture contains AND gate in which there are two inputs A and B and it produces one output (X)
Q: Is it the hardware or the software if you power on a computer for the first time and there is no…
A: Computer system:- A computer system is a combination of hardware and software components that work…
Q: Consider the programming problem "Create a program for determining the velocity of a vehicle in…
A: in the above problem we have to find velocity so the input by the user should be Distance travelled…
Q: Write a program in C++ to do the following tasks. a) Read a number N from the user. b) Using…
A: Recursive functions are those functions that call themselves again and again. Until a termination…
Q: Given a directed graph with non-negative edge weights, suppose we have computed the shortest paths…
A: Shortest Path Problem: The shortest path problem is a classic problem in graph theory that…
Q: Write the status of the Carry (C), Zero (Z), Negative/Sign (N), and Overflow (V) flags after an…
A: below I have provided a handwritten solution to the given question
Q: Which of the following statement(s) is/are True? O switch is more intelligent than hub as it can…
A: answer is
Q: Based on the pseudocode below, draw a flowchart that represents the program. Start Receive the…
A: logic/explanation read numPen total=numPen*1.20 if total>50 discount=(total*30)/100…
Q: 3. Salina is a manager at UCY Company. She intends to find the average of income for her employer.…
A:
Q: ...... .
A: The code implements a queue data structure in C. The program prompts the user to enter the maximum…
Q: (A) Design a divide by 96 counter using 7490 ICs.
A: Introduction : as asked in the question we need to draw a divide by 96 counter using IC 7490 only.
Q: The number of non terminal nodes in Directed Acyclic Graph(DAG) of the expression is…
A: Introduction :
Q: PARTICIPATION ACTIVITY 7.6.5: Arrange the following lines of code so that amount is set to the…
A: Initialize variables: str as a string to store the input dollar amount, and amount as a double to…
Q: Little's Law with multiple servers. Assume one application sends packets to a network switch at rate…
A:
Q: Please solve out this problem...
A: It is a GUI Based Application using Java.I have done it using eclipse IDE. Steps: Open eclipse IDE…
Q: SOSL Assignment Salesforce: In this assignment you have to find the all the account or contact where…
A: Introduction to Salesforce Object Search Language Make chosen filters while developing SOSL queries…
Q: If the value of the segment register is 0049H, and the value of the selected descriptor is…
A: 1. Number of descriptor 213 = 8192 descriptor 2. Answer : No Access is not granted because A bit is…
Q: If A is a 3x3 matrix, which of the following is the correct syntax to Interchange the first and the…
A: Matlab is a matrix programming language. The rows of a matrix can be accessed by using the index…
Q: can you please convert this python code into java? Python code is as shown below: #recursive…
A: Algorithm: rowPuzzle(row, pos, visited) Step- 1 Start Step- 2 If row[pos] == 0, return True. Step- 3…
Q: Please answer correctly need asap. 1. Consider following code that computes the factorial of a…
A: The result of k = -1 is:
Q: (1)..
A: Explanation: x86 processors store and get data from memory using little-endian order (low to high).…
.
Step by step
Solved in 3 steps with 2 images
- Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…Langauge is C.
- Using C++ Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get as close to 21 as possible without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player Loop: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is…Write a c++ program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D 6 A B C D 7 A B C D The program should display the seat pattern, with an 'X' marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like this: 1 X B C D 2 A X C D 3 A B C D 4 A B X D 5 A B C D 6 A B C D 7 A B C D After displaying the seats available, the program prompts for the seat desired, the user types in a seat, and then the display of available seats is updated. This continues until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should say that that seat is occupied and ask…ACME Bank’s new Pocket Money Saver account program, encourages school kids to learn the importance of saving money and manage expenses wisely, and you have been asked to design a software tool for rolling out this scheme to its bank customers. Write a console program, that will calculate the pocket money saved over a period, with one cent at the start of account setup, will double every day. For example, if the opening balance is one cent the first day, it will be two cents the second day, and continues to double each day. The console program you will write, should ask the user for the number of days, and display a table showing what the saving was for each day, and then show the total savings at the end of the period. The output should be displayed in a dollar amount, not the number of cents. A successful test run of the program is as shown in the screenshot below:
- Write a program using c++that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get as close to 21 as possible without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player Loop: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is…The objective of this program is to demonstrate your proficiency with the if-elif-else construct. Your program will consist of a simple guessing game. Using the random module, generate an integer between 1 and 10. This will be the secret. You will then ask the user for a guess between 1 and 10. . If the guess is greater than the secret respond, "Too high". • If the guess is less than the secret respond, "Too low". . If both numbers are equal respond, "Success!". Remember to test your program to ensure that all of the comparisons work. Please note that a loop is not required. The images below shows the program being run multiple times to display the three different possible output messages. Your display should look like this. User input is highlighted in green. Please enter your guess: 10 Too high! Please enter your guess: 5 Too low! Please enter your guess: 1 Success!1. In the game of Monopoly, a pair of dice are rolled to move a player's piece around the board. If a double is rolled (the dice show the same number), the player receives another roll of the dice. If a double is rolled a second time, a third roll of the dice is received. If a double is rolled on the third occasion, the player forfeits their turn (and goes to Jail). Write a program which simulates two players having 50 turns each (a turn however many dice rolls a player has in a row before it's the other player's turn) and determines: a) the total number of spaces moved by each player; and b) how many times a player rolls a double which results in movement of a piece. Use the randi function. For fun, incorporate the rule that a player cannot leave Jail (cannot move) unless they either roll a double or three turns have passed without rolling a double.
- Write a program that reads student scores, gets the best score, andthen assigns grades based on the following scheme:Grade is A if score is ≥ best -5Grade is B if score is ≥best -10;Grade is C if score is ≥best -15;Grade is D if score is ≥best -20;Grade is F otherwise.The program prompts the user to enter the total number of students, and thenprompts the user to enter all of the scores, and concludes by displaying the grades.Here is a sample run: Enter the number of students: 4 ↵EnterEnter 4 scores: 40 55 70 58 ↵EnterStudent 0 score is 40 and grade is FStudent 1 score is 55 and grade is CStudent 2 score is 70 and grade is AStudent 3 score is 58 and grade is CWrite a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’tdisplay the computer’s choice yet.)2. The user enters his or her choice of “rock,” “paper,” or “scissors” at the keyboard.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Therock smashes the scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins.(Scissors cuts paper.)• If one player chooses paper and the other player chooses rock, then paper wins. (Paperwraps rock.)• If both players make the same choice, the game must be…For this C++ hw do the following: Your game, the player’s goal is to reach campus exactly. The player starts 14 miles away and has up to 4 turns to reach campus. At each turn the play can ride either use a Bus, a Subway, or a Jetpack: Riding a Bus moves the player forward 2 miles each turn. Riding a Subway moves the player forward 5 miles each turn Riding a Jetpack moves the player forward 10 mile each turn. Example:You are 14 mile(s) from campus!How do you wish to travel? (1 bus, 2 subway, 3 jetpack) The player chooses one. After each turn, the player is informed how much farther she must travel before reaching campus. Winning/Losing: After the last turn, if the player has reached campus exactly ("You have won!") Otherwise, explain the problem: "You have over-shot your target!" or "You haven't reached your target!" And then write “You lose!” The game will operate as follows: Report how far the user is from campus – the player starts 14 mile away For each turn: o Ask user to…