Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP Form: I am trying to figure out how to drop lowest grade and average the other five grades. 1. If all six textboxes contain

PHP Form: I am trying to figure out how to drop lowest grade and average the other five grades.

1. If all six textboxes contain values, load the values into an array and use the necessary functions of arrays to show the following separated by appropriate headings:

a)the top five quiz scores shown in descending order

b)the lowest quiz score that is dropped before the average is calculated

c)the average of the top five scores formatted to two decimal places

My Current code:

body> form action = "." method="post"> h3>Enter Quiz Scores:h3> label>Quiz 1: input name="score1" value="(!empty($scores[0])) echo $scores[0];?>" autofocus>%label>br> label>Quiz 2: input name="score2" value="(!empty($scores[1])) echo $scores[1];?>">%label>br> label>Quiz 3: input name="score3" value="(!empty($scores[2])) echo $scores[2];?>">%label>br> label>Quiz 4: input name="score4" value="(!empty($scores[3])) echo $scores[3];?>">%label>br> label>Quiz 5: input name="score5" value="(!empty($scores[4])) echo $scores[4];?>">%label>br> label>Quiz 6: input name="score6" value="(!empty($scores[5])) echo $scores[5];?>">%label>br> p>input type="submit" value="Find Average of 5 High Scores">p> form>  if(count($scores)==6){ echo '

Graded Quizzes:

'
; for ($arrayIndex=0; $arrayIndexecho
'

'

. number_format($Average,2).''; } else { echo '

Please enter scores in all textboxes.

'
; } ?> body>

*************************************************************

Expected to work like this:

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago