Write a program that will display "IT'S COLD!" if the temperature is less than 20, "IT'S HOI" if the temperature is greater than 30, "COOL CLIMATE!" otherwise.
Q: a program that stores and prints the months of a year:
A: a program that stores and prints the months of a year:
Q: Write a program that randomly generates a number between 1-200, then asks the user to guess the…
A: Program: from random import randintrandom_number = randint(1, 200)count = 0userinput =…
Q: Create a program that converts a temperature in degrees Fahrenheit to the corresponding temperatures…
A: NOTE: Since the programming, langauge is not mentioned therefore answering the question in python…
Q: Write a program called celsius_to_fahrenheit which prompts the user for a Celsius temperature,…
A: Algorithm / Steps: User input for celsius temperature Converting celsius temp to Fahrenheit temp…
Q: A program for entering a number. If 2 points the number is greater than 100, it prints the number,…
A: Ans-: 1) option (a) 2) false 3) option (a)
Q: Write a program that asks the user for the number of miles driven and the gallons of used. It should…
A: The formula to calculate the miles per gallon of the vehicle is as follows Miles per gallon,…
Q: Write a program that displays a random lowercase letter usingthe Math.random() method.
A: PROGRAM: //Header file import java.util.*; //Defining the class class Main { //Defining…
Q: Write a program that accepts a number of minutes and converts it both to hours and days. For…
A: As no programming language is mentioned it is solved using basic C++
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT GIVEN, I HAVE USED PYTHON FOR THE SOLUTION Define…
Q: Write a program that displays a random uppercase letter.
A: CODE: public class Main{ public static void main(String[] args) { char ch =(char)((int)'A'+…
Q: Write a program that displays the differences between the first and last, the second and next to…
A: Program description: n is the user input integer variable that stores the number of elements in the…
Q: Write a program that prompts the user to enter an uppercase letter and converts it to a lowercase…
A: Program plan: Take input in uppercase add 32 to in ( ascii code) print character
Q: Write a program using if, and elif and else, that asks the user what their favorite food is. Then…
A: We need to read a string and compare the string with list of favorite food.
Q: Create a program that will distinguish the age of the student. If the student is 13 to 19 years old,…
A: Step-1: Start Step-2: Declare a variable age and take input from user Step-3: If age is greater than…
Q: Write a program that asks the user for a number of seconds and prints out how many minutes and…
A: Program: To asks the user for a number of seconds and print as minutes and seconds format.…
Q: write a program that reads the height in centimeters and then converts the height to feet and…
A: NOTE: As the programming language is not mentioned in the question. So, we have solved this question…
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: 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 asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a program that converts temperature from Celsius to Fahrenheit and Fahrenheit to Celsius. The…
A: Program is below as per requirements with commented explanation and output.
Q: Write a program that shows the growth of money that occurs in a savings account. Your program should…
A: Program code: #prompt the user to enter initial balance initialBalance=int(input("Enter initial…
Q: Write a program that calculates the amount of money a person would earn over a period of time if his…
A: here in given question ask for python program.
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 a program that prompts the user to enter a telephone number expressed in letters and outputs…
A: #include<iostream> using namespace std; int main (){ string inputString, outputString;…
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 prompts the user to enter apoint (x, y) and checks whether the point is within…
A: NOTE: - The following solution is implemented in java. EXPLANATION: - To know if the point lies…
Q: Write a program that display the letter grade (A if number bigger than 90, B if number bigger than…
A: Here, I am going to write a python program to print the grade when a user enters the number.
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 can suggest an activity based on the temperature. If the temperature is between…
A: Hi. As you have not mentioned any programming language, I will choose Python. Let's move on to…
Q: Create a program that asks the user to tell a story using input from the keyboard and print it Ask…
A: your question is about python programming. let's write the code for it
Q: Write a program that begins by reading a temperature from the user in degrees Celsius. Then your…
A: Given: To Write a program that begins by reading a temperature from the user in degrees Celsius.…
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a value…
A: Lets see the solution.
Q: Write a program named FahrenheltToCelsius that accepts a temperature in Fahrenheit from a user and…
A: Please find the answer below :
Q: write a program that accepts a number and determines whether the number is positive, negative or a…
A: here in this question we have asked to write a program which takes an input from user and…
Q: Write a program that prompts the user to enter the year and first day of the year, then displays the…
A: Given, we get- year from the user, first day of the year from user. based on the above data, we…
Q: Write a program that reads a number in feet, converts it to meters, and displays the result. One…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that prompts the user to enter the number of items and each item’s name and price,…
A: Step 1:- Program Approach:- 1.Include the header files 2.Declare variables, an array of data type…
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 will distinguish the age of the student. If the student is 13 to 19 years old,…
A: INTRODUCTION: Here we need to tell create a program that will distinguish the age of the student.
Q: Write a program that displays a table of speeds in kilometers per hour with their values converted…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){ int…
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 =…
Q: Write a program that asks the user for an animal sound, then prints out that sound twice on the same…
A: the answer is given below:-
Q: Write a program that calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Q: Write a program that will display the even numbers from 1 to 100.
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Q: Write a program that prompts the user to enter the number of students and each student’s score, and…
A: Given:- Write a program that prompts the user to enter the number of students and each student’s…
Problem 16 - Conditional Statements
C++ program pls
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program that generates a random number in the range from 1 through 100 After generating the random number, the user is to guess the number. If the user’s guess is higher than the random number, the program should display “Too high, try again” If user’s guess is lower than the random number, the program should display “Too low, try again”. If the user guesses the number, the program should congratulate the user and then generate a NEW random number so the game can start over. Make the game menu driven with these options Main Menu ______________ 1)Play Game 2)Exit written in pythonWrite a program that displays a simulated paycheck. The program should ask the user to enter the date, the payee’s name, and the amount of the check. It should then display a simulated check with the dollar amount spelled out, as shown here: Date: 12/24/2012 Pay to the Order of: John Phillips $1920.85 One thousand nine hundred twenty and 85 cents You may assume the amount is no greater than $10000. Be sure to format the numeric value of the check in fixed-point notation with two decimal places of precision. Be sure the decimal place always displays, even when the number is zero or has no fractional part. Use either C-strings or string class objects in this program.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.
- A county collects property taxes on the assessed value of property, which is 60 percentof its actual value. For example, if a house is valued at $158,000.00 its assessed valueis $94,800. This is the amount the homeowner pays tax on. If the tax rate is $2.64 foreach $100.00 of assessed value, the annual property tax for this house would be$2502.72.Write a program that asks the user for the actual value of a piece of property and thecurrent tax rate for each $100.00 of assessed value. The program should then calculateand display how much annual property tax the homeowner will be charged for his or herproperty. The program should also display the Property Value, the Assessed Value, andthe Tax Rate. Display all monetary values to two decimal places Property Value: Tax Rate$100,000.00 2.64$200,000.00 2.05$350,000.00 3.10A county collects property taxes on the assessed value of property, which is 60 percentof its actual value. For example, if a house is valued at $158,000.00 its assessed valueis $94,800. This is the amount the homeowner pays tax on. If the tax rate is $2.64 foreach $100.00 of assessed value, the annual property tax for this house would be$2502.72.Write a program that asks the user for the actual value of a piece of property and thecurrent tax rate for each $100.00 of assessed value. The program should then calculateand display how much annual property tax the homeowner will be charged for his or herproperty. The program should also display the Property Value, the Assessed Value, andthe Tax Rate. Display all monetary values to two decimal places Run your program three times with the data below Property Value: Tax Rate$100,000.00 2.64$200,000.00 2.05$350,000.00 3.10Write 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
- For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.A county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. If an acre of land is valued at $10,000, its assessment value is $6,000. The property tax is then 75¢ for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $45. Write a program that asks for the actual value of a piece of property and displays the assessment value and property tax.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…
- The Yukon Widget Company manufactures widgets that weigh 9.2 pounds each. Write a program that calculates how many widgets are stacked on a pallet, based on the total weight of the pallet. The program should ask the user how much the pallet weighs by itself and with the widgets stacked on it. It should then calculate and display the number of widgets stacked on the pallet.Write a program that can suggest an activity based on the temperature. If the temperature is between 20 to 40 degrees Fahrenheit, suggest the user go skiing; if the temperature is between 41 to 60 degrees Fahrenheit, suggest the user go hiking; if the temperature is in the range of 61 to 80, suggest swimming. For all the temperatures out of these ranges (too cold or too hot), then suggest staying inside.java Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (0, 0) with width 10 and height 5. For example, (2, 2) is inside the rectangle and (6, 4) is outside the rectangle, as shown in the Figure. (Hint: A point is in the rectangle if its horizontal distance to (0, 0) is less than or equal to 10 / 2 and its vertical distance to (0, 0) is less than or equal to 5 / 2.) Here are sample runs of the program: Sample 1: Enter a point with two coordinates: 2 2 Point (2.0, 2.0) is in the rectangle Sample 2: Enter a point with two coordinates: 6 4 Point (6.0, 4.0) is not in the rectangle Analysis: (Describe the problem including input and output in your own words.) Design: (Describe the major steps for solving the problem.) Coding: (Go over your code step by step) Testing: (Describe how you test this program). In other words run your code with sample outputs.