Check whether a student has passed the exam.

In this python if else program, we will check whether a student has passed the exam or not depending on the marks scored by the student.

Condition to pass the test:
If the marks obtained by the student are equal to or greater than 45 then the student has passed the test, otherwise student has failed the test.

Steps to solve the program
  1. Take the marks of the student as input through the user.
  2. Use an if-else statement to determine whether a student has passed the exam or not.
  3. Use the criteria given in the question to determine the outcome.
  4. Print the output.
				
					marks = int(input("Enter marks of a student: "))

if marks>=45:
    print("Pass")
else:
    print("Fail")
				
			

Output :

				
					Enter marks of a student: 50
Pass
				
			

Related Articles

check if any given string is palindrome or not

check whether the given number is positive or not.

Leave a Comment