Chat with us, powered by LiveChat Computer Science | Writedemy

Computer Science

Computer Science

<Problem 1: 20> Draw a flowchart for the program that will calculate BMI from a height (in inches) and a weight (in pounds). The program will tell the BMI along with advice.

BMI is calculated in the following way.

BMI = weight in pounds x 703 height in inches x height in inches

Give the following advice.

BMI
25.0 and above Exercise more
Less than 25.0 You have a healthy weight

Test your algorithm using the following 2 cases.

<Test1>

height: 67 weight: 120

Outputs are 19.79

You have a healthy weight

<Test2>

height: 67 weight: 200

Outputs are 31.32

Exercise more

page4image11280 page4image11440

<Problem 2: 40 points> Draw a flowchart for the program that will read an unknown number of ages. (0 is a valid age used for a baby.) The user will enter a negative number if there are no more ages to enter. The program will output the average age and youngest and oldest ages. If no ages were entered, display “No ages were entered” (see <Test 4> below).

Hint: Use 2 boxes to store the youngest and oldest ages. What would you put in these boxes at the beginning?

Test your algorithm using a table with the following 4 cases. Make one table for each test. You will have 4 separate tables.

Age Age ≥ 0 Num Total + AgeàTotal Youngest Oldest Avg

<Test 1> 20, 0, 10, 5, -1

Outputs should be 8.75 (average age) 20 (oldest)
0 (youngest)

<Test 2> 100, 105, -5

Outputs should be 102.5 (average age) 105 (oldest)
100 (youngest)

<Test 3> 50, -7

Outputs should be 50 (average age) 50 (oldest)
50 (youngest)

<Test 4> -1

Outputs should be
No ages were entered

page5image12064 page5image12384

 

<Problem 3: 40 points> Draw a flowchart for the program that will let a teacher enter exactly 5 scores (each score needs to be greater than or equal to zero). The program will output the total and average score. Reject bad inputs from the user. If she enters a negative number, tell her “Invalid score. Enter a score again”.

Test your algorithm using a table with the following 2 cases. Make one table for each test. You will have 2 separate tables.

page6image4816

Repetition# Score Score < 0

<Test 1>

Enter a score: -10
Invalid score. Enter a score: -50 Invalid score. Enter a score: -35 Invalid score. Enter a score: 20 Enter a score: -30
Invalid score. Enter a score: 60 Enter a score: -40
Invalid score. Enter a score: 40 Enter a score: 30
Enter a score: 15

The total score is 165 The average is 33

<Test 2>

Enter a score: 25 Enter a score: 55 Enter a score: 0 Enter a score: 80 Enter a score: 30

The total score is 190 The average is 38

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order