// Lecture - Coding Task 1 - Solution

/*
1. Create the variables to represent scores of exams for John and Nick and set the values 80 and 45;
2. Create the variable to set the lower limit for passing the exam and assign the value 51;
3. Write the condition in if statement which will check if both students have passed an exam and log 
   the result in console;
4. Use else if statement in order to check if one of the students has passed an exam and log the 
   result in console;
5. Use else statement in order to display in console that both students have failed;
6. In case of passing the exam by one of the students, find out which one was that and display in 
   console as an additiona; information about the student and his points
7. Test ass the possible cases (both students passed, John passed and Nick failed, Nick passed and 
   John failed, both students failed).
*/

// SOLUTION:

/*
var scoreOfJohn = 80;
// var scoreOfJohn = 49;
var scoreOfNick = 45;
// var scoreOf Nick = 75;
var pass = 51;

if (scoreOfJohn >= pass && scoreOfNick >= pass) {
  console.log('Both students passed');
} else if(scoreOfJohn >= pass || scoreOfNick >= pass) {
  console.log('One of the students passed:')

   if (scoreOfJohn > scoreOfNick) {
     console.log('and it is John with ' + scoreOfJohn + ' points');
   } else {
     console.log('and it is Nick with ' + scoreOfNick + ' points');
   }
} else {
  console.log('Both of the students failed');
}
*/









