Write a program that plays the popular scissor–rock–paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper canwrap a rock.) The program randomly generates a number 0, 1, or 2 representingscissor, rock, and paper. The program prompts the user to enter a number 0, 1, or2 and displays a message indicating whether the user or the computer wins, loses,or draws. Here are sample runs: scissor (0), rock (1), paper (2): 1↵EnterThe computer is scissor. You are rock. You won
Q: Write a program that assigns the following values:
A: Program understanding In java, assigning the values to a variable of a particular type is performed…
Q: Write a program that takes the user age and prints the following: Print too old, if age is greater…
A: Use if else if statements to check all the conditions one by one
Q: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the…
A: Given: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based…
Q: You have been asked to write a program to play rock-paper-scissors. Your program will ask the user…
A: PROGRAM CODE: import java.io.*;import java.util.*; class Main { public static String…
Q: Write a program that prompts the user toenter the year and first day of the year, then displays the…
A: PROGRAM EXPLANATION: - Three static []s are declared and initialized for names of months, days in…
Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…
A: 1. Input All values 2. Calculate gross=hour_pay_rate*10 deduction=gross*0.20 state=gross*0.09…
Q: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The…
A: The program has the following algorithm: Declare the necessary variables within the “main()”…
Q: Use Python to write a program that asks the user to enter a pocket number and displays whether the…
A: We can use relational operators or range function to check the number whether in range or not So,…
Q: In Python, Create a program that prompts the user to pick their lucky #. If the number is greater…
A: #python program that prompts the user to pick their lucky #. If the number is greater than 7, then…
Q: Write a program that calculates and displays a person’s body mass index (BMI). A person’s BMI is…
A: According to the Question below the Solution: Program Output:
Q: Write a program that takes user input describing a playing card in the following shorthand…
A: Hello Student. Greetings Hope you are doing great. As you have not specified any particular language…
Q: Write a program that prints a grocery receipt of items purchased.
A: EXPLANATION- Create main function . Declare seven variables with suitable names Initialize all the…
Q: Write a program that calculates the estimated hours and minutes for a trip given the number of miles…
A: Given: Write a program that calculates the estimated hours and minutes for a trip given the number…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: The question is to write a code for the given problem and no language has been mentioned, here C++…
Q: Write a program using if, and elif and else, that asks the user what their favorite food is. Then…
A: According to the information given:- We have to create the program in that we as user to tell his…
Q: How do I solve this 3 step problem dealing with fitness and calorie tracking in java? thnks and…
A: Hello. Since you have posted multiple questions and not specified which question needs to be solved,…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Program Explanation: Declare the header files Declare and define the function to compare two…
Q: Write a program that gets two car information from the user, compares them, and print out the…
A: First, we need to define Car class with the attributes and methods and then define the main function…
Q: Write a program that prompts the user to enterthe month and year and displays the number of days in…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the…
A: Start input age through get_age function if person is not in between 18 to 75 the print message…
Q: Write a program that lets the user guess whether a flipped coin displays the head or the tail. The…
A: GIVEN: Write a program that lets the user guess whether a flipped coin displays the head or the…
Q: Write a program that asks the user for two integers that will correspond to the numbering of the…
A:
Q: Good job!” and then ask for another input. When the user types an odd number, display an error…
A: Define java.util package for i/o operations Define class EvenEntryLoop Define main method taking…
Q: Write a program that displays a simulated paycheck. The program should ask the user to enter the…
A: Define header file <iostream>, <cstring> , <string> and <iomanip>. Define…
Q: Write a program that allows a user to enter any number of student quiz scores, as integers, until…
A: Since you haven't mentioned the programming language, we are answering this question in C++. Program…
Q: Write a program that calculates how much money you’ll end up with if you invest an amount of money…
A: In Cpp Program #include <iostream>#include <cmath>using namespace std; int main(){int…
Q: Write a program that prompts the user to enter the three points (x1, y1), (x2, y2), and (x3, y3) of…
A: Python Code: # Enter three points for a trianglex1, y1, x2, y2, x3, y3 = eval(input( "Enter three…
Q: Write a program that interprets the Body Mass Index (BMI) based on a user's weight and height. It…
A: Python code to find BMI of person is given below.
Q: Write a program that will take as input the type of restaurant the user ate at, the cost of the…
A: Use if else if conditions to check each type and add tax in every case
Q: Write a program called p3.py that prints out a classic hangman stick figure. The program should ask…
A: We need to create the program according to the given output for the hangman in python.
Q: Write a program that prompts the user to enter the year andfirst day of the year and displays the…
A: Create an object of a Scanner class for the inputs. Input the number of the year. Input the number…
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program that accepts a number and determines whether the number is positive, negative or a…
A: Given:
Q: rite a program for an airline company. that asks the user about his luggage weight. * if the luggage…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT MENTIONED, I HAVE USED PYTHON FOR THE SOLUTION.…
Q: Write a program that accepts the names of three political parties and the number of votes each…
A: Actually, program is a executable software that runs on a computer.
Q: For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a…
A: c# program for Pizza Price using System; class MainClass { public static void Main (string[] args)…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Use an array to store individual digits of each number and then compare these two arrays bit by bit…
Q: Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car…
A: Program Plan: importing the libraries of utility class for scanner and other mathematical…
Q: Write a Python console application that prompts the user for a number. The application should return…
A: The asked code for the python program is given in the next step with explanatory comments.
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION. Define…
Q: Write a program for a game that consists of two players. The rule of the game is that player 1…
A: For the above problem, I am going to provide a solution in python.
Q: Write a program named TypingGrades that allows a user to enter a student's number of words typed.…
A: Conditional statement: The conditional statement is used to control the flow of execution based on…
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A:
Q: Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Write a program that takes user input describing a playing card with the following shorthand: A =…
A: When we consider a C++program, it can be defined as a collection of objects that communicate via…
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: Write a program that helps the user count his change. The program should ask how many quarters the…
A: Java program is asked for the given requirements.
Q: CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZEN IF YES, THEN GIVE 20% OFF IF…
A: As no programming language is mentioned here, we are writing this program in python price =…
Write a
paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can
wrap a rock.) The program randomly generates a number 0, 1, or 2 representing
scissor, rock, and paper. The program prompts the user to enter a number 0, 1, or
2 and displays a message indicating whether the user or the computer wins, loses,
or draws. Here are sample runs:
scissor (0), rock (1), paper (2): 1↵Enter
The computer is scissor. You are rock. You won
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Write a program that plays the popular scissor-rock- paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) The program randomly generates a number 0, 1, or 2 representing scissor, rock, and paper. The program prompts the user to enter a number 0, 1, or 2 and displays a message indicating whether the user or the computer wins, loses,or draws.In the Raptor program Write 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’t display 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. (Rock smashes 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. (Paper wraps rock.)• If both players make the same choice, the…Write 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…
- In the Raptor program Write 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’t display 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. (Rock smashes 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. (Paper wraps rock.)• If both players make the same choice, the…In the Raptor program Write 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’t display 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. (Rock smashes 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. (Paper wraps rock.)• If both players make the same choice, the…Using C# in Microsoft Visual Studio create an application 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 is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.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. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…
- 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 generate a new random number so the game can start over. Additional 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 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 an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average.
- Scissor, rock, paper Write a program called GameSRP.java that plays the popular scissor-rock-paper game where a scissor can cut paper, a rock kan nock a scissor and a paper can wrap a rock. The program asks the user for one of the options (1 for scissor, 2 for rock or 3 for paper) and then randomly picks one of them for the computer. It then presents if you or the computer won, or if it was a draw. If the user enters 0 the program will end and display the total score (number of wins for you and the computer and the draws). Here is a sample run: Scissor (1), rock (2), paper (3) or 0 to quit: 1 You lost, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 2 It's a draw! Scissor (1), rock (2), paper (3) or 0 to quit: 3 You won, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 1 You lost, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 2 It's a draw! Scissor (1), rock (2), paper (3) or 0 to quit: 3 You won, computer had rock! Scissor (1),…Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. An example of the program is shown below: Enter a score >> 6 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 9 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 99 4 valid scores were entered Highest was 9 Lowest was 6 Average was 7.25 PLEASE WRITE A JAVA CODE import java.util.*; public class QuizScoreStatistics { public static void main (String args[]) { // Write your code here } }Write a program that lets the user guess whether a flipped coin displays the head or the tail. The program randomly generates an integer 0 or1, which represents head or tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.