Write a Java program that prompts the user to enter the grades and their weight of three Exams. The program calculates and displays the final grade. Hint: Use the following formula: [Grade of Exam 1] * [Weight of Exam 1]% + [Grade of Exam 2]* [Weight of Exam 2]% + [Grade of Exam 3]*[Weight of Exam 3]% Sample Run: Enter the grade of Exam I and its weight: 75 20 Enter the grade of Exam II and its weight: 60 30 Enter the grade of Exam III and its weight: 85 50 The final grade is 75.5
Q: Write a program that prompts a student to enter a Java score. If thescore is greater or equal to 60,…
A: Program: //import the header file import java.util.Scanner; //definition of class public class…
Q: JAVA: Write a program that reads an integer and prints how many digits the number has, by checking…
A: Given: Write a program that reads an integer and prints how many digits the number has, by checking…
Q: Write a java program that allows the user to enter his name and his year of birth, the program…
A: Start Take the input of the age. Compute the age. Print the age with years, month, days Print the…
Q: Write a program that prompts the user to enter an integer and prints the value of the following…
A: Output Screenshot: Sample run 1: Sample run 2:
Q: Write a java code that will calculate the number of cows for a period of time entered by the user…
A: for loop is used to solve this problem.
Q: Add a Method to Accept names and marks of n students from user, enter the value of n from User…
A: EXPLANATION Create a simple class student which will have two fields name and marks. Now call…
Q: Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the…
A: I give the code in Java along with output and code screenshots.
Q: Write a program that reads from the user two integers and displays whether they have the same number…
A: Given:
Q: Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the…
A: Here we need to define a separate method to find whether a number is perfect or not. Let it called…
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Java Code: import java.util.Scanner; public class LabProgram { public static void…
Q: Create a Java program that asks the user to input a student number. The format of the student number…
A: Java Program for the above scenario
Q: a three-month delivery report for three diffrent years. The following rows and columns represent the…
A: Step 1: Below the java program to display a three-month delivery report for three different years
Q: Write a program that reads the name, the gender (F/M) and age of the user and checks if he can go…
A: Create 3 variables (String)name, (int) age and (char) gender. Take input name from user and store in…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Answer
Q: write a java program that will calculate the sale based on the price per unit and the number of…
A: ALGORITHM:- 1. Take input from user. 2. Calculate the results. 3. Print the result. 4. Finish.
Q: Write a Java program that prompts the user to enter a positive integer value between 5 and 45 and…
A: The program reads a value from the user using the Scanner object. Then declare and initialize the…
Q: Write java program that generate two integer random numbers between 15 and 43 and print out the…
A: Given question has asked to write a program having following functions: Random number generator.…
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Actually, 000Java is a programming language originally developed by James Gosling at Sun…
Q: Write a Java program that does the following: 1. In the main() method complete the following: 1.…
A: import java.util.*;public class Main { static String leaveHospital(ArrayList < Double > []…
Q: Write a java program that simulates rolling a pair of dice 10,000 times and counts the number of…
A: EXPLANATION: - The dice simulation is done 10,000 times. The variables for keeping tracks of cases…
Q: Write a java program that asks the user to enter a day (from 1 to 31), a month (from 1 to 12), and a…
A: JAVA code and sample output whether the date is magic date or not is stated in step 2.
Q: Write a java program that reads an integer from the user. The program displays the number of digits…
A: Algorithm: Start Read a number Initialize count=0 Initialize min=9999999, max=-1 Iterate through…
Q: Java, a real estate office handles 50 apartment units. When rent is $600 per month, all the units…
A: Actually, java is a object oriented programming language.
Q: Write a Java code to accept marks of a student from 1-100 and display the grade according to the…
A: Conversion of string to integer type value: The util package of java provides Scanner class and it…
Q: Write a java program that reads n of type integer and calculates and prints the value sum of squares…
A: /******************************************************************************…
Q: Write a java program that ask the user to enter number of days in the month, then reads the daily…
A: logic:- read value of n iterate from I=0 to I<n Read values in array arr. end loop set…
Q: Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the…
A: The question is to write JAVA code for the given problem.
Q: Java Write a program whose input is two integers, and whose output is the first integer and…
A: Start input two numbers check if first number is less than second run a while loop and increment by…
Q: Write a program that reads an integer value and prints the sum of all even integers between 2 and…
A: Solution: Given, Write a program that reads an integer value and prints the sum of all even…
Q: Write a program in Python that reads the following information and prints a payroll statement:…
A: answer : import java.util.scanner; public class employeepayroll { public static void main(string[]…
Q: Write a java program that uses a Scanner to ask the user for two integers. Call the first number…
A: Required: Write a java program that uses a Scanner to ask the user for two integers. Call the first…
Q: Write a program that reads from the user the cinema ticket price and the number of history cinema…
A: Steps: Take price and history reservation as input. Based on history reservation, compute discount…
Q: Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the…
A: A perfect number is one whose sum of factors (except the number itself) is equal to the number. In…
Q: Write a java program that generate two random numbers, number1 and number2, numberl between 12 and…
A: Program to determine whether the user wins. Pseudocode: number1 = Generate random integers in range…
Q: Create a JAVA program Write a program that reads total marks of 5 students and give their grades…
A: Required: Create a JAVA program Write a program that reads total marks of 5 students and give their…
Q: Write a java program that read two integer numbers width and height the of a rectangle, the program…
A: Code and sample output of the code is in step2.
Q: Write a JAVA program using loop that asks the user to input seven integer numbers representing-..…
A: I have given an answer in step 2.
Q: Write a java program that prompts the user to enter two integers, intl.eft and intRight, taking into…
A: PROGRAM CODE: import java.util.*; // import the java utility packagepublic class…
Q: write in JAVA LANGUAGE Create a program that will compute PRELIM, MID-TERM, PRE-FINAL, FINALS GRADES…
A: Task : Collect the 3 quiz marks in Prelim Midterm Pre-Finals Finals Output the list of grades…
Q: Write an java application that allows a user to enter any number of student quiz scores, as…
A: Program: import java.util.*; class Main { public static void main(String args[]) { Scanner sc =…
Q: Write a java program that reads n of type integer and calculates and prints the value sum of squares…
A: Java Code
Q: Write a program that reads from the user the cinema ticket price and the number of history cinema…
A: Step 1 : Start Step 2 : In the main method , Take user inputs for the Ticket price and number of…
Q: Write a java program that prompts the user to enter two integers between 10 and 80 inclusive, finds…
A: Java program for given question - import java.util.*;class Main { public static void…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Step-1: Start Step-2: Declare variable currentKm, initialKM, fuelAmount and fuelConsumption Step-3:…
Q: hat will input the following data: Student Name, Average, Tuition Fee and output Total Tuition Fee.…
A: Student Name, Average, Tuition Fee and output Total Tuition Fee. 95 – 100…
Q: Write a Java program that prompt user to input 10 students in a class. Then, prompt user to input…
A: The code given here is
Q: Using Java to, write a program that asks the user for survey data about bus riders, and outputs a…
A: read muniline read number of days read number of riders calculate avg=(float)riders/days display avg…
Q: Write a Java program that sums a series of 10 numbers without duplicates. These numbers are supposed…
A: Java program to solve the given problem is given below.
Q: Write a Java program that prompts the user to enter the grades and their weight of three Exams. The…
A: Import the java utility In main class declare a variable n as integers Declare float variables…
Q: Write a Java program that prints the following table (including formatting).…
A: Actually, the code has given below:
Step by step
Solved in 2 steps with 1 images
- (Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.Problem C: Snake Eves on Crazy Dice Write a program that simulates rolling two twenty-sided dice 100000 times, counting now many times the sum of the two dice is 2. Based on these results as well as the results of the program (snakeeyes.py) shown in class, make a guess as to how often one can expect to roll snake-eyes (two Is) on a pair of dice labeled I through n, for any positive integer n. Sample Run You got snake-eyes 35 times out of 100000. That is .035 percent of the time. Roughly, that is 1 in 2857 times. Note: The numbers shown above are NOT realistic. This is just to show the format desired for your output. In Python Code10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)
- Program - python A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula: calories from fat = fat grams x 9. Next, she calculates the number of calories that result from the carbohydrates, using the following formula: calories from carbs = carb grams x 4. Write a program that will make these calculations. Your program should use two separate functions to calculate fat and carb calories. Write a 3rd function that is called from main to capture user input and call the others.Design by C++ Using subroutines (VOID) write a program to perform numerical integration of f(x)=x^2*sin(x)*exp(x^2) over x=[0,Pi] having a choice of (i) rectangular rule (ii) the Simpson’s rule Divide the domain into N subsections, where N=5,10,20,40. Compare your results.C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.
- python code Problem 5 A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula: calories from fat = fat grams x 9. Next, she calculates the number of calories that result from the carbohydrates, using the following formula: calories from carbs = carb grams x 4 . Write a program that will make these calculations. Your program should use two separate functions to calculate fat and carb calories. Write a 3rd function that is called from main to capture user input and call the others.Problem B Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…Problem B. Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…
- 10.25 LAB: Quadratic formula Implement the quadratic_formula() function. The function takes 3 arguments, a, b, and c, and computes the two results of the quadratic formula: x1=−b+b2−4ac2a x2=−b−b2−4ac2a The quadratic_formula() function returns the tuple (x1, x2). Ex: When a = 1, b = -5, and c = 6, quadratic_formula() returns (3, 2). Code provided in main.py reads a single input line containing values for a, b, and c, separated by spaces. Each input is converted to a float and passed to the quadratic_formula() function. Ex: If the input is: 2 -3 -77 the output is: Solutions to 2x^2 + -3x + -77 = 0 x1 = 7 x2 = -5.5015. Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter 1. (You may assume that the value of . In your program, declare a named constant PI to store this value.)Question 4 Write a C++ program that evaluates Ly=b and then Ux=y. L and U are the upper and lower triangular matrices of a square matrix A. b is a set of randomly generated numbers. Solve the equations to get the solution x. Full explain this question and text typing work only thanks