Pass or Fail

Pass or Fail

Easy Python Control Flow 14 views
Explanation Complexity

Problem Statement

Marks m are provided (0 to 100). Output PASS if m is at least 35, otherwise output FAIL.

Input Format

• First line: Integer m (marks)

Output Format

• Print one word:

• PASS if m ≥ 35

• FAIL otherwise

Example

40
PASS

Constraints

• 0 ≤ m ≤ 100

Concept Explanation

Input:
m = 40

Since 40 is greater than or equal to 35,
the output is PASS.

Step-by-Step Explanation

1.Read integer m.

2.If m ≥ 35, print "PASS".

3.Otherwise, print "FAIL".

Concept Explanation

Input:
m = 40

Since 40 is greater than or equal to 35,
the output is PASS.

Step-by-Step Explanation

1.Read integer m.

2.If m ≥ 35, print "PASS".

3.Otherwise, print "FAIL".

Input / Output Format

Input Format
• First line: Integer m (marks)
Output Format
• Print one word:

• PASS if m ≥ 35

• FAIL otherwise
Constraints
• 0 ≤ m ≤ 100

Examples

Input:
40
Output:
PASS

Example Solution (Public)

Python
import sysns=sys.stdin.read().strip()nif not s: sys.exit(0)nm=int(s)nsys.stdout.write('PASS' if m>=35 else 'FAIL')

Official Solution Code

import sysns=sys.stdin.read().strip()nif not s: sys.exit(0)nm=int(s)nsys.stdout.write('PASS' if m>=35 else 'FAIL')
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.