Skip to content

Objective of the project presented and the calculation of the average of each student's grades.

License

Notifications You must be signed in to change notification settings

GomidesTs/average-of-students

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

average-of-students

Objective of the project presented and the calculation of the average of each student's grades.

  • A function that will calculate the average of each student's grades;
function average() {
     for (let student of students) {
         let average = ((student.firstNote + student.secondNote) / 2).toFixed(2);
         console.log(`Student ${student.name} opted for media ${average}`);
     }
}
  • Assuming the average for this contest is 7, check whether each student was successful or not in entering the contest and show a message on the screen.
if (average >= 7) {
             console.log(`Congratulations, you were approved!\n`);
         } else {
             console.log(`Failed, try again!\n`);
         }

Instructions

How to run the project

git clone https://github.com/GomidesTs/average-of-students.git

cd average-of-students

At the terminal

node script.js

In the browser

Open the index file in your browser right click -> inspect element (or just f-12) -> console

License

The MIT License (MIT)

Copyright (c) Gomides Ts

About

Objective of the project presented and the calculation of the average of each student's grades.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published