Dcoder icon

Grade the Students @Dcoder

By Lochard | As a newbie programmer | 28 Apr 2023


Problem: In Dcoder school, a student will pass if he/she satisfies the following criteria:

1. If he/she gets more than 70 marks in Mathematics.

2. If he/she gets more than 50 marks in Algorithms.

Given the marks of Mathematics and Algorithms, print whether the student is passing or not.

Input: The first line contains an integer T denoting total number of test cases.

Then in the next following T lines, each line contains two numbers which denote the marks in Mathematics and Algorithms respectively.

Output: For each test case, print "Pass" if all the conditions are satisfied else print "Fail".

Constraints: 1<=T<=10.

1<=Marks<=100.

Sample Input: 2

80 80

70 60

Sample Output: 

Pass

Fail

for i in range(int(input())):
  m, a = map(int, input().split())
  print('Pass' if m > 70 and a > 50 else 'Fail')

How do you rate this article?

3


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.