A Hotel Resérvation Program Write a program that allows the user to reserve a room in a hotel and display the price of this reservation. The program will ask the user to choose a type of room, either single or double (S,D). Then the user will enter the number of nights. The price of each night according to the type: Туре price 200 $ 300$ The reservation cost = number of nights * room price. If the user enters a letter different from (S or D) for the type, then the program must display "invalid room description". If the user entered number of nights that less than or equal to 0, then the program must display "invalid number". Below are some sample runs:
Q: 4. Area of a Rectangle • Write a program that compares the area of two rectangles. You can do this…
A: len_rect1 = float(input("Enter the length of first rectangle: ")) # taking the length of rect1…
Q: A mobile phone service provider has three different subscription packages for its customers: Package…
A: Code: #include <iostream>using namespace std;int main(){ char choice; int mins, extramins;…
Q: Write a program that can be used to assign seats for a commercial airplane. The airplane has 13…
A: NOTE: - Below code is implemented in c++. PROGRAM EXPLANATION: - The airplane has 13 rows with 6…
Q: Question: Party budget planning - complex Prompt the user to enter their current budget and the…
A: You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String []args){…
Q: LIFE INSURANCE PREMIUM CALCULATOR Write a C program that calculates monthly, quarterly, half-yearly…
A: Please find the answer below :
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: The complete code in python programming language is below:
Q: Scissor, rock, paper Write a program called GameSRP.java that plays the popular scissor-rock-paper…
A: We have to write a JAVA code foe Scissor, Rock and Paper with our computer. It will be continuous…
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: Given: To write a program that uses these rules to calculate and display a contestant’s score. A…
Q: Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $…
A: Find Your Code Below
Q: (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity…
A: //Whenever if you asked programming related questions you should always have to specify in which…
Q: Department Program Maps Student Services Academics Career Department 444 01 Week-7 Test-2 (10%…
A: Explanation of the code is given by the comments in the code itself. NOTE: The file name should be…
Q: Grade Point Average- GPA calculator: Write a program that asks the user to enter his letter grade in…
A: //Program to calculate GPA
Q: Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75…
A: code is given below:
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic(int left, int right, int digit) // the function to generate…
Q: Homework – Topic 6 – Calculator: Write a program which allows the user to perform simple tasks on a…
A: #include<stdio.h> #include<stdlib.h>void menu( );void add( );void sub( );void mul(…
Q: A code in c++ or python A program that asks you to enter the name of a movie or series, and then…
A: #using python#asking user to enter movie or series namename = input('Enter name of a…
Q: Please Write java application not python please? You giving us wrong answers we dont need python we…
A: import java.util.*; public class Limpopo{ public static void main(String args[]) {…
Q: Question: Party budget planning - complex Prompt the user to enter their current budget and the…
A: Calculate and print out all the options of meals where the budget is used entirely(where possible)…
Q: Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console),…
A: Below is the required java program. Program Approach: Import necessary packages to get the standard…
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: Function Name: dominosTime() Parameters: N/A Returns: None Description: During the summer, you…
A: Python used to answer this question
Q: Magie Number Programming: Magic program ask user to enter three integers by the user, the three…
A: Given: Magic program ask user to enter three integers by the user, the three integers represent left…
Q: A flight company computes the ticket price of a travel depending on the reservation rate and the…
A: The requested Java program code has been provided in the next step using if-else statements.
Q: PYTHON programming solotion Develop a program that allows the user to enter a start value of 1 to…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: import randomdef game(): exit = True while(exit==True): #User enters his/her choice of…
Q: Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest…
A: ANSWER:-
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic_numbers(int left, int right, int digit) // the function to…
Q: Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: Refer to step 2 for the answer.
Q: The language is C# Write a program named TestScoreList that accepts eight int values representing…
A: Program: using System;//using static System.Console; class TestScoreList{static void Main(){int…
Q: An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance…
A: Program Explanation – Import the essential java libraries. Declare the class named as Main.…
Q: Java Programming A dentist requests you to develop the Dental Payment application. This application…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: ISSUE NEEDED TO BE SOLVED: I attached the error codes that keep presenting themselves with the code…
A: Below is the explanation:
Q: Code 2: Write a program that will prompt a user to enter a systolic blood pressure (SBP) and…
A: Below is the required program in C language. Program Approach: Including header files for the…
Q: Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member…
A: Note : I have added the output screenshot. Also with total money made, the code prints members and…
Q: Write method IsEven that uses the remainder operator (%) to determine whether an integer is even.…
A: Program : import java.util.Scanner; public class Main { public static boolean isEven(int z){…
Q: Different types for operators > equal →greater or equal > less or equal → not equal → greater → less…
A: The question on writing kotlin program to check the given condition.
Q: 24. Word Game Write a program that plays a word game with the user. The program should ask the user…
A: sample output
Q: Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can…
A: Source Code: #include<iostream>using namespace std; int main(){ cout<<"Enter…
Q: A Hotel Reservation Program Write a program that allows the user to reserve a room in a hotel and…
A: Source Code: import java.io.*;import java.util.Scanner; public class Reservation{ public static…
Q: circles) Write a program that prompts the user to enter the center coordinates and radii of two…
A: Here is the Java program according to the problem given: import java.util.Scanner; public class…
Q: ++ program int quadrant() This method will return at which quadrant does this point lie in our…
A: Required: C++ program int quadrant() This method will return at which quadrant does this point lie…
Q: Question 7
A: Following is the C++ program and its approach is given below: Declare necessary header files.…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: Approach Built-in methods used: toUpperCase() length() charAt()
Q: (Financial application: calculate future investment value) Write a program that reads in an…
A: Convert the interest rate from annual interest rate to monthly interest rate
Q: (Algebra: solve quadratic equations) The two roots of a quadratic equation ax + bx + c = 0 can be…
A: read a , b and c from user. pass value of a,b and c to function RootFind. check if a==0 display…
Q: // A standard mortgage is paid monthly over 30 years. // This program is intended to display 360…
A: Answer: for(int i=0; i<30;i++)//this loop is for the year for(int i=0;j<12;j++) printf("the…
Q: Assignment: Carefully read the instructions and write a program that reads the following information…
A: The following program is compiled in replit and also Eclipse.Pseudo code:Get the inputs from the…
Q: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
write the
Step by step
Solved in 3 steps with 3 images
- Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the OutputNice Number Programming: Nice program ask user to enter three integers from keyboard (java console), the three integers represent left bound, right bound and arbitrary digit 'm', where left bound is less than right bound. Program should print all nice numbers in the given range that doesn't contain digit 'm'. The number is nice if its every digit is larger than the sum of digits which are on the right side of that digit. For example 741 is a nice number since 4> 1, and 7> 4+1. with digit m=2. Write a complete program in Java that Call only One method (niceNumbers method) that will print all nice numbers excluding a given digit 'm' that also entered by user?stoppingDistance = speed * (2.25 + speed / 21)Write a program which determines whether a vehicle’s tailgating distance is safe.The program should read in the speed of the vehicle and the vehicle’s tailgatingdistance. The program should then calculate the distance that would be required tostop the vehicle.If the stopping distance is less than the tailgating distance, your programshould print “No problem.” If the stopping distance equals the tailgatingdistance, your program should print “Minor wreck.” If the stopping distanceis greater than the tailgating distance, your program should print “Majorwreck!”
- stoppingDistance = speed * (2.25 + speed / 21)Write a program which determines whether a vehicle’s tailgating distance is safe.The program should read in the speed of the vehicle and the vehicle’s tailgatingdistance. The program should then calculate the distance that would be required tostop the vehicle.If the stopping distance is less than the tailgating distance, your programshould print “No problem.” If the stopping distance equals the tailgatingdistance, your program should print “Minor wreck.” If the stopping distanceis greater than the tailgating distance, your program should print “Majorwreck!”Notice that the expression on the right side of the formula above will force thecompiler to convert everything to type double. Use type double for your workingvariables. Write your program so that it is able to produce the following screendisplay:Sample session:Enter your speed (in mph): 60.0Enter your tailgate distance (in feet): 240.0Major wreck!Consider records of employees each consists of employee's first name (string), number of hours worked (int)and hourly rate in Bahraini Dinar BD. (double).Write a program that reads from the user multiple records for multiple employees and displays the following onscreen:(a) the salary for each employee (Salary = Hours Worked x Hourly rate.)(b) the number of employees(c) the highest salary with employee name.Reading records of employees should stop when the user enter `stop' for the employee name. Sample I/O of theprogram is shown in the example below.Programming Language: Java Direction: Write a program to determine the number of PASSED and FAILED out of 15 inputted names with the corresponding grade. Restrict the inputted grade for each name in the range of 50 to 100, in which 75 is the passing grade. If the inputted grade is not on the range, the program will remind the user of a message for the accepted range for the grade and allows the user to re-enter a grade. NOTE: MUST ADD COMMENTS
- In programming language C.Write a program to calculate electricity bill charged to a consumer. Ask him to enter the units consumed. For all units less than or equal to 200, each unit is to be charged at Rs. 2. If units>200 and <=400, first 200 units is to be charged at Rs. 2 and other units is charged at Rs. 4. Each unit more than 400 will be charged at Rs. 5.Programming Exercise 10 in Chapter 6 asks you find the mean and standard deviation of five numbers. Extend this programming exercise to find the mean and standard deviation of up to 100 numbers. Suppose that the mean (average) of n numbers x1, x2, . . ., xn is x. Then the standard deviation of these numbers is:S=sqrt(((x1-x)^2+(x2-x)^2+...+(xi-x)^2+...+(xn-x)^2)/n)An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance Note: Use switch cases when you check the total number of accidents.
- 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:USING C++ PROGRAMMING LANGUAGE A mobile phone service has three different data plans for its customers: PLAN A: For $19.99 per month, 2 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN B: For $59.99 per month, 8 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN C: For $79.99 per month, Unlimited data is provided. Write a program that calculates a customer’s monthly bill. It should input the customer name, which plan was purchased, and how many gigabytes were used. It should then create a bill that includes the input information and the total amount due. It should also display how much money plan A customers would save if they purchased plan B or C, and how much money plan B customers would save if they purchased plan C. If there would be no savings, no message should be printed. Wherever possible, use named constants instead of numbers.Number guessing Game Write a C program that implements the “guess my number” game. The computer chooses a random number using the following random generator function srand(time(NULL)); int r = rand() % 100 + 1; that creates a random number between 1 and 100 and puts it in the variable r. (Note that you have to include <time.h>) Then it asks the user to make a guess. Each time the user makes a guess, the program tells the user if the entered number is larger or smaller than its number. The user then keeps guessing till he/she finds the number. If the user doesn’t find the number after 10 guesses, a proper game over message will be shown and the actual guess is revealed. If the user makes a correct guess in its allowed 10 guesses, then a proper message will be shown and the number of guesses the user made to get the correct answer is also printed. After each correct guess or game over, the user decides to play again or quit and based on the user choice, the computer will make…