Problem definition: A college wants to know how well its students did on an exam. The following program summarizes the results. The program asks a user to enter the results pass (1) or fail (2) for 10 students. It displays the number of passed and the number of failed. It displays a message "Raise error" if the number of passes is more than 8 You are asked to identify statement with syntax errors by selecting them as wrong and the correct statements as right
Q: Floating point numbers are initialized to type Float or Double data type. Develop a code which asks…
A: SOLUTION logic use necessary header file declare main method declare variable of integer type…
Q: (Financial application: payroll) Write a program that reads the following infor- mation and prints a…
A: CODE:- # Get the employee's namename = input("Enter employee's name: ")# Get the number of hours…
Q: -Write a program that asks the user to enter a person's age. The Problem 2: Age Classifier program…
A: EXPLANATION - In this program if and else condition is used to classify the age. First a variable…
Q: Guess The Number Game: write a C++ program that will ask the user to guess a secret number randomly…
A: #include<iostream> using namespace std; int main(){ int guess,score_p,score_c,random,i;…
Q: Write a program that asks the user to enter a number of seconds. -There are 60 seconds in a minute.…
A: The below given Java program will obey the following rubrics: Importing required package. Defining…
Q: Personal BestWrite a program that asks for the name of a pole vaulter and the dates and vaultheights…
A: Given:- Personal BestWrite a program that asks for the name of a pole vaulter and the dates and…
Q: Financial application: compare loans with various interest rates) Write a program that lets the user…
A: Actually, program is a executable software that runs on a computer.
Q: (Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are…
A: import java.util.Scanner; public class AreaOfAregularPolygon4_5 { public static void main…
Q: 2. Loan Repayment' Write a program that helps a loan company determine the payment schedule for…
A: HI THEREI AM ADDING ANSWER BELOWPLEASE GO THROUGH ITTHANK YOU
Q: (Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bx + c = 0 can be…
A: For the question we need user to input value for a,b,c. Then we will check value of b^2 - 4ac And…
Q: C CODE PLEASE 3.28 Fixed LAB: Warm up: Automobile service cost (1) Prompt the user for an…
A: Introduction: C CODE PLEASE 3.28 Fixed LAB: Warm-up: Automobile service cost (1) Prompt the…
Q: c++ programming if…else and switch case are types of conditional selection statements used in many…
A: All the questions are coded in C++.
Q: Write a program to calculate electricity charges for a customer. The program requests a name,…
A:
Q: Q2) Write a program that prompts the user to input two integers: First Integer and SecondInteger…
A: Step-1: StartStep-2: Declare variables FirstInteger, SecondInteger and take inputs from userStep-3:…
Q: (Calculating Credit Limits) Collecting money becomes increasingly difficult during periods of…
A: The above problem will make use of Scanner class defined under java.util package. It I used to take…
Q: A Hotel Resérvation Program Write a program that allows the user to reserve a room in a hotel and…
A: Given: To write a Java program for hotel reservations.
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: A 4th grader is having trouble with Permutation and Combination problem in Mathematics, so a friend…
A: #include <iostream>#include "functions.h" using namespace std; int main(){ while(true)…
Q: C++ Ingredient Adjuster A cookie recipe calls for the following ingredients: 5 cups of sugar 1 cup…
A: C++ Ingredient Adjuster A cookie recipe calls for the following ingredients: 5 cups of sugar 1 cup…
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: S. A company provides loans to new college graduates based on the following conditions: The…
A: The above question is answered in step 2 :-
Q: 2. The following table contains earthquake magnitude ranges on the Richter scale and their…
A: C++ code for the above problem:- #include<iostream>using namespace std;int main(){float…
Q: UO wants a program that displays the amount of money charged for a seminar. The fee per person is…
A: // Code in java import java.util.*; public class Main{ public static void main(String[] args) {…
Q: Morgan’s Department Store distributes bonuses to its salespeople after the holiday rush. Table 9-6…
A: import java.util.Scanner;class Test155 { public static void main(String args[]) { Scanner sc = new…
Q: The following code intends to input a user’s first name, last name, and age.However, it has an…
A: Corrected Code: #include <iostream>#include <string.h>using namespace std; int main(){…
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: (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 X 2…
A: Java code: //import Scanner classs from util packageimport java.util.Scanner; public class Main{…
Q: Construct a program that calculates the course overall grade point average (GPA). The program must…
A: Actually, program is a executable software that runs on computer.
Q: Salary Calculator Develop a program that will determine the gross pay for each of several employees.…
A: logic:- use a infinite loop , while loop read number of hours(-1 to end) if hours==-1 break…
Q: C++ PROGRAM Problem Statement: A 4th grader is having trouble with Permutation and…
A: - We need to highlight the code for the provided scenario of permutations and combinations in C++…
Q: 5. (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 X 2…
A: Input the numbers from the user, split the number and convert them into float. unzip the list item…
Q: C++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates.…
A: According to the information given:- We have to write code in C++ for General Crates, Inc. builds…
Q: Answer this question Write a program that calculates and displays a person’s body mass index…
A: Here language is not mention so we C language to fulfill the question requirement:…
Q: Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a…
A: A command line arguments are arguments passed at the time of running time of program through the…
Q: A bug collector collects bugs every day for 7 days. Write a program that keeps a running total of…
A: A bug collector collects bugs every day for 7 days. Write a program that keeps a running total of…
Q: Text-based adventure game: Pretend you are creating a text-based adventure game. At different points…
A: def choice(c): if c == 1: print("Fight") elif c == 2: print("Run") elif c ==…
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: Programming Assignment: Car Repair For this programming assignment, create a car repair program that…
A: PROGRAM: //Header file #include<iostream> #include<iomanip> using namespace std;…
Q: (Health application: BMI) Body Mass Index (BMI) is a measure of health on weight. It can be…
A: Code import java.util.Scanner;public class test{ public static void main(String args[]){…
Q: Irite a program that prompts the user to input an integer between 0 and 35. If the number is less…
A: #include <iostream>#include <iomanip> Below is the code for a given requirement using…
Q: C++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates. With…
A: #include <iostream>#include <iomanip> using namespace std; int main(){ double len;…
Q: C Sharp case Problem 2-1 In Chapter 1, you created two programs to display the motto for the…
A: C# Program is given below - This program takes input from the user. The input is not validated as…
Q: + Multiple Conditional Statements EmployeeBonus2.py >- Terminal 1 # EmployeeBonus2.py This program…
A: Find out the mistake from the code.
Q: Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The…
A: logic:- read three score. Find avg=(a+b+c)/3 use if else to find out avg category. Display grade.…
Q: O A thrown Error indicates a serious problem that a reasonable application should not try to catch.
A: Error is a subclass of Throwable that indicates serious problems that a reasonable application…
Q: (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 x 2…
A: python program: #This code is for python3. #Prompt the user for input. a = float(input("Enter a: "))…
Q: C exercises - conditional statements 1. Write a C code that prompts the user to input three integer…
A: NOTE: Based on our rules, when multiple questions are posted, we should answer only the first…
Q: amount of money charged for a seminar. The fee per person is based on the number of people…
A: Since no programming language is mentioned I am using c++ Algorithm: 1. Start 2. Enter the number of…
Q: Assignment statements based on input value Write an if-else statement that assigns finalValue with…
A: Answering first question as per the guidelines. The problem is based on the basics of functions in…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
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 OutputExercise I- Medicine Write a program that asks the user to enter the name of the medicine (t for ThroX, f for FeliX), his mass. The user should enter as well if he has a prescription or not. The program will calculate the dosage using: age and his ThroX without prescription -The max dosage should be 0.75 mL -The dosage = mass / 150 -The number of pills per day to take is 1 ThroX with prescription -The dosage =mass * 3 / 150 -The number of pills per day to take is 5 FeliX with prescription -The dosage = 0.77 mL FeliX without prescription -The dosage should be between 0.3 and 0.7 -The dosage = mass * 0.009 -The number of pills per day to take is 2 -The number of pills per day to take is 6 The program should display the dosage and the number of pills to be taken per day if the requirements are full filled, otherwise it display "Please check your doctor for a prescription". In case the medicine does not exist in the database, the program display “Your medicine is not in our database!"…Happy Numbers Programming challenge description: A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers. Input: Your program should read lines of text from standard input. Each line contains a single positive integer, N. Output: If the number is a happy number, print 1 to standard output. Otherwise, print 0. 1 process.stdin.resume(); 2 process.stdin.setEncoding('utf8'); 3 4 let stdin = ''; 5 process.stdin.on('data', (chunk) => { stdin = '$(stdin)${chunk}"; 7)).on('end', () => { 6 9 8 const lines = stdin.trim().split('\n'); for (const line of lines) { process.stdout.write('$(line)\n'); 10 11 } 12 }); 13 H > Test Case Output & G e
- Remaining Time: 54 minutes, 49 seconds. * Question Completion Status: QUESTION 19 Write a Java program that prompts the user to enter the School Grade Level of a student and then calculate their discount amount in the regular fees structure offered during this pandemic situation. By using the below table, calculate their discount amount from the amount of the regular fee and then print the discount amount in OMR by using the appropriate selection structure. (Assume the user is entering a maximum Grade level is 12) discount amount = Regular Fees * percentage of discount rate School Grade Level Regular Fees in OMR Discount Rate >9 and 6 and 3 and 0 and <=3 30.500 5% otherwise 20.400 No discount T T T Arial 3 (12pt) v T -E E- 只i ン Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers TOSHIBA F5 F6 F7 F8 F9 F10 F11 F12 INS SCNULL LOCK AD & 67 7 V 8A9 4 0Retail price calculator Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00.• If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item.INFS3410 Practice Questions Chapters 1, 2 and 3 The Following is an example run of an educational program for school children. The program help kids to practice their additions and subtraction skills. Your task is to develop a program that can achieve the same exact thing. Bear in mind the following important guidelines: - The user may choose between additions and subtractions - The user may choose the difficulty level (easy, medium, hard) - The program should display 5 questions and calculate the total score - No two questions should be the same Please enter your name: Hafedh AlShihi ************** Hello Hafedh AlShihi Welcome to our Additions / Subtractions Practice ****k********* Which operation you want to practice? Type 1 for Additions, or Type 2 for subtractions: 2 Please select your difficulty level Type 1 for Easy (numbers 1 to 10) Type 2 for Medium (numbers 10 to 100) Type 3 for Hard (numbers 100 to 1000) 1 Here are 5 easy-level subtraction questions, please attempt all: How…
- Java Lab 5 Problem Statement Write a program that quizzes the user on the names of the capital cities for all the states in the United States. Each state is presented to the user, and they must enter the name of the capital. The program then either tells the user they're correct or tells them the correct answer. The user's answer should not be case-sensitive. At the end, the program tells the user the total number they got correct. Here's an example: What is the capital of Alabama? MontogomeryThe correct answer is Montgomery.What is the capital of Alaska? juneauThat is the correct answer!...You got 32 out of 50 correct! The state capitals will be stored in a 2D String array of size 2 x 50, with the first column the name of the state and the second the name of the capital city, for all 50 states. To create the state capitals array, follow these instructions: Copy the String from the attached file into your program (found below these instructions). The String is a pipe delimited…Direction: Read each sentence/ situation carefully and select the BEST answer among the choices. 1. It is a Boolean expression that tells when the loop will exit. 2. The sequence that makes up the loop body may either be a block of Turbo C statements or a single Turbo C statement. 3. In Turbo C it is a reserved word. 4. Its values determine the number of times the loop iterates. 5. It is the second type of open-ended loop. Condition For Loop Statement For Do while LoopPlease answer in C# Write a program named TemperaturesComparison that allows a user to input five daily Fahrenheit temperatures that must range from −30 to 130. If a temperature is out of range, require the user to reenter it. If no temperature is lower than any previous one, display a message Getting warmer. If every temperature is lower than the previous one, display a message Getting cooler. If the temperatures are not entered in either ascending or descending order, display a message It’s a mixed bag. Finally, display the temperatures in the order they were entered, and then display the average of the temperatures. Your program's output should look like the following: Getting warmer: 70 74 77 78 81 Average: 76
- //PROBLEM 1/* This program should play a game with the user asking her to guess a target number (randomly generated integer between 1 and 10). The user gets 3 attempts. If she gets it wrong, the program tells her to go up or down, depending on whether her number was less or more then the target. The output may look like this, for example: ============= Guess the number between 1 and 10 in THREE attempts. Enter your first guess: 4 Nope. Go up. Enter your second guess: 6 Nope. Go down. Enter your third and final guess: 5 You got it! CONGRATULATIONS! ============= or like this: ============= Guess the number between 1 and 10 in THREE attempts. Enter your first guess: 4 Nope. Go up. Enter your second guess: 6 Nope. Go up. Enter your third and final guess: 8 GAME OVER! You lost! The number was 9Programming Assignment: Car Repair For this programming assignment, create a car repair program that prompts the user to enter information about a customer, the customer's vehicle, and the work performed on the customer's vehicle. Your program should then display the final car repair bill on the computer screen. Your program should accomplish the following: 1. Prompt the user to enter the following information: a. Information about the customer (name, street address, city, state, zip code, phone number). b. Information about the customer's vehicle (make, model, year). c. Information about the work performed (brief description, labor hours needed, cost of parts). 2. Use a labor cost amount of $100.00 per hour and a sales tax rate of 7.0%. 3. Calculate the following: Variable subtotal sales tax total repair bill amount Formula subtotal = labor cost per hour * number of labor hours sales tax = sales tax rate * subtotal total repair bill amount = subtotal + sales tax 4. A screen shot of a…Program Unit Score Calculator Console App Write a Python Console Application program that allows the user to enter the marks for different assessments in a unit, and computes the total mark and grade for the unit. Here is the program logic specification: There are six assessment activities Quiz1, Quiz2, Quiz3, Quiz4, Lab Journal, Major Assignment and Final Exam. The four quizzes are worth 5 marks each, the Lab Journal is worth 10 marks, the Major Assignment is worth 30 marks and the Final Exam is worth 40 marks. The algorithm for computing the total mark for the unit is: Total Mark = Quiz1+Quiz2+Quiz3+Quiz4+Major Assignment+ Lab Journal + Final Exam The following screenshot shows a successful test run: