Concept explainers
(Test Drive: Body Mass Index Calculator) By recent estimates, two-thirds of the people in the United States are overweight and about half of those are obese. This causes significant increases in illnesses such as diabetes and heart disease. To determine whether a person is overweight or obese, you can use a measure called the body mass index (BMI). The United States Department of Health and Human Services provides a BMI calculator at http://www.nhlbi.nih.gov/guidelines/obesity/BMI/bmicalc.htm. Use it to calculate your own BMI. An exercise in Chapter 2 will ask you to program your own BMI calculator. To prepare for this, research the formulas for calculating BMI.
Trending nowThis is a popular solution!
Chapter 1 Solutions
C++ How to Program (10th Edition)
Additional Engineering Textbook Solutions
Starting Out with Python (3rd Edition)
Database System Concepts
Starting Out with Python (4th Edition)
Using MIS (10th Edition)
Starting Out With Visual Basic (8th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
- User-Defined Function: Miles to track lapsarrow_forwardpizza (python)Mario owns a pizzeria. Mario makes all of his pizzas from 10 different ingredients, using 3 ingredients on each pizza. Mario’s cousin Luigi owns a pizzeria as well. Luigi makes all his pizzas from 9 ingredients, using 4 ingredients on each pizza. Mario and Luigi have made a bet: Mario believes that customers can order a larger selection of pizzas in his pizzeria than they can order in Luigi’s pizzeria. Use functions for this assignment. Implement a factorial() function yourself (do not use the one from the math module) When choosing k items from n possible items, the number of possibilities can be obtained using the following formula: (??)=?!?!(?−?)!(nk)=n!k!(n−k)! Make a function called choose with two parameters n and k, that implements the above formula. Write a program that calculates the number of pizzas Mario and Luigi can make. The outcome should look like this: Mario can make 120 pizzas.Luigi can make 126 pizzas. Luigi has won the bet.arrow_forward(Transportation) Road construction requires estimating the expected loads on a road’s pavement over its design life. A common approach for determining this information is to use ESAL values; one ESAL is the load a single 18,000-lb (80,000 N) single-axle truck applies to the road’s surface. The ESAL value for any single-axle vehicle can be approximated by this formula: ESAL=[W18,000]4 ESAL is the equivalent single-axle load. W is the vehicle’s weight (lbs). Using this formula, write, compile, and run a C++ program that determines ESAL values and use it to complete the following chart. The ESAL values should be output in a field width of 10, with six digits after the decimal point.arrow_forward
- Entered Answer Preview Result Message correct (923,998) (923,998) (2398,2171) (2398, 2171) correct (2,808) (2,808) Your answer isn't a number incorrect (it looks like a list of numbers) At least one of the answers above is NOT correct. (1 point) Consider the elliptic curve group based on the equation y² = x + ax + b x3 mod p where a = 2440, b = 295, and p = 3391. We will use these values as the parameters for a session of Elliptic Curve Diffie-Hellman Key Exchange. We will use P = (2, 808) as a subgroup generator. You may want to use mathematical software to help with the computations, such as the Sage Cell Server (SCS). On the SCS you can construct this group as: G=Elliptic Curve (GF(3391), [2440,295]) Here is a working example. (Note that the output on SCS is in the form of homogeneous coordinates. If you do not care about the details simply ignore the 3rd coordinate of output.) Alice selects the private key 18 and Bob selects the private key 15. What is A, the public key of Alice?…arrow_forward(Please do not give solution in image format thanku) types of implementation methodologies an organisation can consider when implementing a new or purchased information system.arrow_forwardUSC (PAG) Personal Academic Guide ™ is your personal electronic sequence sheet. This is a simple application to keep track of each course you are doing/have done, serve as a personal exam timetable for the course which have final exams, keep track of your projects for courses with projects and keep a record of grades earned. It should also allow you to write notes for each course you have done. The concept is like a check sheet system blended with a simple exam timetable. Use the UML Class diagram below to: Create the appropriate sequence diagrams to model at least three (3) areas of your application.arrow_forward
- College Driver Insurance offers discounted auto insurance to college students. The company uses several factors to set discounts, as follows:• A student who has taken a safe driver course earns a 5% discount.• A student with a clean record (no tickets or accidents in the last three years) earns a 5% discount.• A student who is 23 or older earns a 5% discount.• A student who meets all three conditions (has taken a safe driver course and has a clean record and is 23) earns an additional bonus discount of 5%.1. Create a decision table that describes the discount rules.2. Simplify the table you just created. Describe the results.3. Draw a simplified decision tree that shows the discount rules.4. What are the pros and cons of using a decision table versus a decision tree?arrow_forwardBarcode Validation As you are aware, barcodes encode numbers. In the Universal Product Code system, each item is assigned a globally unique number. But not every number is a valid UPC. Why? Part of the answer is the check digit. In order to catch errors, the rightmost digit is calculated from the others. If this digit does not match its expected value, you can be assured the barcode is invalid, or has been read incorrectly. To calculate the check digit, perform the following operations modulo 10: • Sum the digits in the odd positions and multiply the result by three. • Add the digits in the even positions to the result. • Subtract the result from 10 to obtain the check digit. Your Task Given a 12-digit UPC, you will need to identify whether is is valid or invalid. The code will be provided from standard input. You simply need to print "valid" or "invalid" in response. Notes The code will be provided on a line by itself, and will consist of numerals alone. You may assume that it will be…arrow_forwardAnalysis of Fitness Performance Five participants in a fitness program; Musa, Husna, Ehsan, Hanna, and Lukman are keep track of the number of calories burned each time they use the gym. At every alternate day, they jot down their time spent to do an exercise and the calories burned. At the end of the week, they would like to know how many minutes they spent each day, the average time for each week, the average number of calories burned they achieved as well as the highest calories burned. Write a program that reads the data recorded by the five participants that contain the following: a. An array to store the names of the five participants and a two-dimensional array of five rows and eight columns of type double to store the times and calories burned for each participant. b. A function named read_data() to read data from the user and display the participant's names and the time (in minutes) spent and the calories burned (in kcal) each exercise day. Parcipant's name should be stored in…arrow_forward
- Describe the role of garbage collection in managing memory associated with unused constants and variables.arrow_forwardCreate a Rock-Scissors-Paper Game. Each player should take his turn at a time without seeing the other player’s choice. The program must be good for a race-to-two game, thus it must monitor the player’s score. (C Language)arrow_forwardExplain the concept of conducting tests on single units.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Enhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning