LearnPy Hub
← Comprehensions problems
Medium

Pass/Fail Dictionary

Read n lines name mark. Build {name: 'Pass' or 'Fail'} (pass at 40+) with a dictionary comprehension and print it.

Input

n, then n lines.

Output

A dictionary.

Sample 1

Input
3
Mim 80
Rafi 35
Sara 40
Output
{'Mim': 'Pass', 'Rafi': 'Fail', 'Sara': 'Pass'}

Sample 2

Input
1
A 0
Output
{'A': 'Fail'}
solution.py
Output appears here
Pass/Fail Dictionary · Python practice problem · LearnPy Hub