Concept explainers
Body Mass Index (BMI) helps in specifying the weight category a person belongs to, depending on their body weight. BMI is estimated using the following formula:
Write a
wherever required.
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Absolute Java (6th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Electric Circuits. (11th Edition)
Modern Database Management
Concepts Of Programming Languages
Java: An Introduction to Problem Solving and Programming (8th Edition)
Starting Out With Visual Basic (8th Edition)
- (Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.arrow_forward(Thermodynamics) a. Design, write, compile, and run a program that determines the work,W, performed by a piston engine providing a force of 1000 N over a distance of 15 centimeters. The following formula is used to determine the work performed: W=Fd F is the force provided by the piston in Newtons. d is the distance the piston moves in meters. b. Manually check the values computed by your program. After verifying that your program is working correctly, modify it to determine the work performed by six pistons, each providing a force of 1500 N over a distance of 20 centimeters.arrow_forwardcode MASM32 Function 1: calculate even numberInput a positive integer n and calculate the sum of even numbers between 0 and n and print the result.Function 2: check leap yearEnter a year and check if the year is a leap year and print the result. A leap year is a year that is divisible by 400 or divisible by 4 but not divisible by 100. Call 2 functions into the main program, compile and run test resultsarrow_forward
- Computer sciencearrow_forwardMiles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input, and outputs the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('%0.2f' % your_value) Ex: If the input is: 1.5 the output is: 6.00 Ex: If the input is: 2.2 the output is: 8.80 Your program must define and call the following function: def miles_to_laps(user_miles) Define the function miles_to_laps taking the variable user_milesReturn the value of dividing userMiles by 0.25In mainDeclare variable user_miles as a doubleInput user_milesAssign to num_laps the value returned from miles_to_laps passing in user_milesOutput num_laps My code to point: def miles_to_laps(user_miles):laps = user_miles * 4return(laps)user_miles = float laps = float(miles_to_laps(user_miles) if __name__ == '__main__':arrow_forwardThe inverse of height is 1 / height. The following program computes the inverse of a measurement of height and then outputs the inversed value. The code contains errors. Find and fix the errors. Ex: If the input is 0.500, then the output is: The inverse of height = 1 / 0.500 = 2.000 #include <iomanip> #include <cmath> #include <iostream> using namespace std; int main() { /* Modify the following code */ int height; int heightInverse; cin >> height; heightInverse = 1 / height; cout << "The inverse of height = 1 / " << fixed << setprecision(3) << height; cout << " = " << heightInverse << endl; return 0; }arrow_forward
- Problem Statement Create a program that will determine the day a particular date falls. Input Input starts with a number N and is followed by N triples (a,b,c), where a, b and c represents the day, month and year. Output The output will be the day when a particular date falls. If the given date is invalid (invalid date, invalid month) then the output should be invalid date Limits 1arrow_forwardThink Time Flowchart Draw a flow chart for a program that will receive the name and final exam results for all FBT0015 students; as long as the result entered by user is not more than 100 or less than 0.Then, calculate the total scores of all results. If the entered result is more than 100 or less than 0, the average willI be calculated and displayed on screen.arrow_forwardParking Charges) A parking garage charges a $2.00 minimum fee to park for up to threehours and an additional $0.50 per hour for each hour or part thereof over three hours. The maximumcharge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hoursat a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for eachcustomer. Your program should print the results in a tabular format, and should calculate and printthe total of yesterday's receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format:Car Hours Charge1 1.5 2.002 4.0 2.503 24.0 10.00TOTAL 29.5 14.50arrow_forwardc++arrow_forward2. Modify the provided code for the program that calculate the overtime hours to: a. calculate the weekly pay for week 1 and week 2 and b. then add them up to calculate the total pay earned for 2 weeks, c. then calculate the amount of taxes withheld based on 18% of the earned pay and d. finally calculate the net pay and display the earned pay, taxes withheld and the net pay (see the output below) Example of output: Enter hours worked: 45 Your overtime hours this week are: Enter hours worked: 39 You had no overtime hours this week 5.0 hours You paycheck summary: For the last 2 weeks, you earned: The total taxes Withheld: $1297.50 $233.55 You net pay is: $1063.95arrow_forwardPython Programming Practice: A = P(1 + r/n)**rt ( **rt means raised to that power) Write a program that makes the calculations by asking for the following input: amount of money originally deposited into the account annual interest rate paid number of times per year the interest is compounded (monthly = 12, quarterly = 4) the number of years the account will earn interest The program should display the following: -original deposit - annual interest rate - amount of money at end of period rounded to 2 decimal placesarrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage