Write a program that simulates rolling a pair of dice. The program should ask the user for what the target value for the dice is.
Q: Write a Java program that prompts the user to enter a grade for a student. The program displays…
A: Program import java.util.Scanner; public class Main{ public static void main(String args[]) {…
Q: Write a program that first asks whether the user wants to play the game of adding two numbers. If…
A: Algorithm of the code:- 1. Create a main function.2. A variable is created called "play_again" and…
Q: Write a Guess the Number game that has three levels of difficulty. The first level of difficulty…
A: I have provided C CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT----------
Q: Write a program that asks the user for the number of adult and the number of child movie tickets…
A: Answer :- #include <iostream> #include <iomanip> using namespace std; int main() {…
Q: Write a program that will compute for the perimeter and the total angle of a triangle, a…
A: use switch case for finding perimeter and validity of shapes.
Q: Cracked Egg Game: There are a dozen eggs in a basket; some are hard boiled and some are raw. The…
A: Program: import random # for simulation hard_boiled = 0print("**** Hard Biled Eggs Game ****\n")…
Q: Rock, paper scissor games. Use a random function for generating the random output by the computer…
A: Solution: Given, Use a random function for generating the random output by the computer side. The…
Q: Coupon collector is a classic statistic problem with many practical applications. The problem is to…
A: Given: Coupon collector is a classic statistic problem with many practical applications. The problem…
Q: Part B: Chore Bonus Your parents pay you $3 for each trash bag full of leaves you rake. If you can…
A: According to the information given:- We have to follow the instructions mentioned to get the desired…
Q: Write a program which calculates the balance of a savings account after the first three months. To…
A: The question has been succesfully solved with Screenshot of code and output with 100%…
Q: There are a dozen eggs in a basket; some are hard boiled and some are raw. The object of this game…
A: I solved this question by using PYTHON PROGRAM--------- I have provided PYTHON CODE along…
Q: 1. Write a program that does the following: Ask the user to enter the price of their items. The user…
A: Actually, program is a executable software that runs on a computer.
Q: Implement a program that computes the area of the ceiling and the walls, as well as the total…
A: User Input:The code uses the prompt function to interact with the user and collect input data for…
Q: Simulate the dice game of lucky sevens. The rules are: roll two dice if the sum equals 7, win $4 if…
A: NOTE : As the question is not specific about which Programming Language is to be used to write the…
Q: dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as…
A: Q. Write a program that plays a dice game called "21"
Q: In business applications, youare often asked to compute the mean and standard deviation of data. The…
A: Program Plan: input number using for loop. Use for loop to compute mean. Use another for loop to…
Q: Python Please Write a program which picks a pair of dice. If the sum of the rolled numbers is 10,…
A: 1. Import the 'random' module for simulating dice rolls.2. Define a function 'roll_dice()' to…
Q: Write a program that asks the user to enter the coordinates of 4 points that draw two different…
A: 1)Take input of coordinates for two lines into list 2) calculate slope of two lines 3) based on…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: The answer for the above mentioned question is given in the following steps for your reference.
Q: An ant is sitting on an infinite grid of white and black squares. It initially faces right. At each…
A: This issue appears to be quite simple at first glance: make a grid, keep track of the ant's location…
Q: In Python A soup company is interested in finding out how much of their soup will go into various…
A: def soup_volume(d, h): r = d / 2 volume = math.pi * pow(r, 2) * h volume = 0.95 * volume…
Q: on't copy.
A: Code is below:
Q: In CORAL LANGUAGE please and thank you! Summary: Given integer values for red, green, and blue,…
A: integer r integer b integer g integer min r = Get next inputb = Get next inputg = Get next…
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: Write a program which takes the user's age in years and convert it into months. 1 Year= 12 Months %D
A: Algorithm: Step1: Declare variables, Nofmonths & years to store values. Step2: Receive the user…
Q: Write a program that will determine how many coins of each denomination (50kr, 25kr, 10kr, Skr, and…
A: I'm using C++ to code following given question:
Q: Note: write a Jave Progame below Question2: Suppose a retail business sells an item that is…
A: Question2: Suppose a retail business sells an item that is regularly priced at $98 and is planning…
Q: Write a program named guess.cpp that generates a random number between 1 and n, where n is the upper…
A: Use srand for generating different number every time and for guessing use a loop till the guess and…
Q: It is given twelve balls of identical weight with the exception of one that is either heavier or…
A: As binary search is a search algorithm that seeks for a certain element in an array by splitting it…
Q: Write a program that will ask the user to enter salary amount. And then compute for the TAX amount.…
A: As the language is not specified answer written in c++ 1)Read input 2)Using if else check…
Q: Children often play a memory game in which a deck of cards containing matching pairs is used. The…
A: SOLUTION- I have solved this problem in C++ code with comments and screenshot for easy understanding…
Q: Write a C# program that plays a guessing game with the user. Your program should select a random…
A: Given Hints:- Some Random Number Generation HintsRandom rndNumber = new…
Q: Write a program that apt the user to input three positive angle values in degrees to decide which…
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided 3 OUTPUT…
Q: Easy Program Please answer fast: you will write a program that calculates the area for ANY…
A: Answer the above program are as follows
program that simulates rolling a pair of dice. The program should ask the user for what the target value for the dice is.
Step by step
Solved in 2 steps with 3 images
- The ideal gas law allows the calculation of volume of a gas given the pressure(P), amount of the gas (n), and the temperature (T). The equation is:V = nRT / PSince we only have used integer arithmetic, all numbers will be integer values with no decimal points. The constant R is 8.314 and will be specified as (8314/1000). This gives the same result. Implement the idea gas law program where the user is prompted for and enters values for n, T, and P, and V is calculated and printed out. Be careful to implement an accurate version of this program. Your program should include a proper and useful prompt for input, and print the results in a meaningful manner.Write a program called CashRegister.cpp. The program should prompt the user for each item they are purchasing and the price. When the user types the word "done", the program should print a receipt that also prints the subtotal, sales tax (6%), and final total. Task 2 Sample Output What is the name of the item? Hamburger What is the price? 1.50 What is the name of the item? French Fries What is the price? 2.00 What is the name of the item? Bread What is the price? 1.50 What is the name of the item? done Hamburger $1.50 French Fries $2.00 Bread $1.50 Subtotal $5.00 Tax (6%) $0.30 Total $5.30 Task 2 Notes • Like with Task 1, the functions you choose to write are up to you, but any program that has all the code in the main and no use of functions will lose half credit. It is recommended you create functions to get the item from the user and a function to print out the receipt and do the calculations.Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user’s preferences. Zillow offers the following three properties for rent: Apartment A – 600 square feet, pets allowed, $1400/month Apartment B – 800 square feet, no pets, $1600/month Apartment C – 1000 square feet, pets allowed, $1800/month Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets they have, and the maximum price they’d pay per month, and then calculate and output the apartments that match their preferences. If there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square footages, prices, and pet numbers don’t make sense!
- Design a program that simulates the slot machine game. When the program starts, it should greet user and then start the game. For each game, the program asks user for the bet amount, and then randomly picks three words/images. If all the three words/images are same, user won three times of the bet amount, if any two of them are same, user won twice of the bet amount, otherwise, user won 0. The program should allow user to play as many games as wanted at one run. The program should display number of games user played, total amount bet and won at the end the program. It should also display each game's information, including game number, bet amount, the three words/images, and won amount. Here is the list of words you may use: Cherries, Oranges, Plums, Bells, Melons, and Bars. i need to do this in raptor flowchartthere are three seating categories at a stadium. for a softball game, class A seats are $30, Class B seats are $20 and Class C seats are $15. Write a program that asks how many tickets for each class of seats were sold and then displays the amount of income generated from ticket sales.Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” If the user guesses the number, the application should congratulate the user and then generate a new random number so the game can start over.Optional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.
- Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program still asks the user to enter the information of many employees until enters a zero value. Sample Run: Enter the number of hours worked (negative nbr to end): 32 Enter hourly rate of the worker: 100 Your salary is $3200 Enter the number of hours worked (negative nbr to end): 40 Enter hourly rate of the worker: 5 Your salary is $200 Enter the number of hours worked (negative nbr to end): 42 Enter hourly rate of the worker: 10 Your salary is 5420 Enter the number of hours worked (negative nbr to end): 0Write a program that generates a random number in the range of 1 through 1000, and asks the user to guess what the number is. If the user guess is higher than the random number, the program should display Too high, try again. If the users guess is lower than the random number, the program should display Too low, try again. If the user guesses the number, the application should congratulate the user and generate a new random number so the game can start over. If the user doesn't want to continue the game the user should type an appropriate stop symbol to terminate the program (such stop conditions were discussed in the class). For each game iteration, count the number of guesses made by the user and display them. The program should contain the following functions: check_guess(): this function checks if the user's guess is lower, higher or equal to the random number. random_gen(): function that generates one random number for one game iteration main(): the function where the program…Write a program to ask the user to enter "how many quizzes?" he/she has entered in a lecture. The program will ask the grade results of the number of quizzes entered. The program will show the quiz results and the average of the quizzes as an output. As an extra challenge, display the maximum quiz result as well. How many quizzes?6 Enter the grade of Enter the grade of Enter the grade of Enter the grade of Enter the grade of quiz 5 : 30 Enter the grade of quiz 6: 12 Avarage of quizzes: 49 Maximum of quizzes: 95 quiz 1: 30 quiz 2 : 95 quiz 3 : 88 quiz 4 : 52
- Could you please help me with this I’m really confused ????PYTHON PROGRAMMINGWrite 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,…