Challenge: Pass or Fail
Test yourself and implement what you have learned so far in this challenge.
We'll cover the following
Problem Statement #
Given the final percentage a student has gotten at the end of a semester, you need to write a program which decides if the student has passed or failed the semester.
If the percentage is higher than or equal to 60, the student has passed the semester and if the percentage is lower than 60 the student has failed the semester.
Input #
The input will be the variable percentage
which stores the final percentage the student received.
percentage
has already been declared for you.
Output #
The output should be pass
if the student has a percentage equal to or higher than 60 and fail
if the student has a percentage lower than 60.
Sample Input #
85
Sample Output #
pass
Test Yourself #
Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!
// Write your code here
Let’s go over the solution review in the next lesson.