Write a bestNote() JS function that takes an array as a parameter and returns the maximum of this array.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

URGENT URGENT URGENT!!!

A teacher wants to write JS code to display information about student grades (results). In particular, he wants to know:The highest grade obtained in the course.

The number of students who passed the course (the number of marks greater than or equal to 60).The number of failing students.The group average (calculate the sum of the marks divided by the number of students).Student citations as follows:If the score is less than 60 show "Failed"If the rating is between 60 inclusive and 70 display "Average"If the rating is between 70 inclusive and 80 display "Good"If the rating is between 80 inclusive and 90 display "Very good"If the rating is greater than 90 display "Excellent" job requested

 

Question 1 Enter student grades using the prompt() window.The notes entered will be stored progressively in an array identified as <notes>.Be careful, check that each note entered is a number. No non-numeric values will be stored in the array.

 

Question 2 Write a bestNote() JS function that takes an array as a parameter and returns the maximum of this array.

 

Question 3 Write a JS function numSuccesses() which takes an array as parameter and returns the number of array elements greater than or equal to 60. This method calculates the number of students who passed.

 

Question 4 Write a JS function nbFailures() which takes an array as a parameter and uses the nbSuccess() method to calculate and return the number of failures, i.e. the number of scores lower than 60.

Question 5 Write a JS sum() function that takes an array as a parameter and returns the sum of the array elements.

Question 6 Write an average() JS function that takes an array as a parameter and uses the sum() method to calculate and return the average of the scores. The average is the sum of the scores divided by the number of scores.

Question 7 Write a JS mention() function that takes as input an integer n and returns a string as follows:If n < 60, returns "Failed"If 60 <= n < 70, returns "Average"If 70 <= n < 80, returns "Good"If 80 <= n < 90, returns "Very good"If 90 <= n , returns "Excellent"  

Question 8 Display in an HTML document page the information concerning the notes entered according to the following format. Replace the…. by the calculated values, using the JS functions written above. --------------- Evaluation results -----------------Best grade :      ……..Number of successes: …….Number of failures: ………Group average: ……..-------------------------------------------------- --------------Lists of notes entered with their mentions: 53 ------------------ Failed70 ------------------ Medium…Etc.

 

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Randomized Select Algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education