LearnPy Hub
← Pandas: Cleaning & Preprocessing problems
Hard

Grade Bands with cut

Fill missing marks with 0, compute each student's average of math and english, and label it with pd.cut into bands [0, 40) Fail, [40, 70) Pass, [70, 101) Distinction. Print name band.

Input

Lines 'name math english' ('-' = missing), then END.

Output

Lines.

Sample 1

Input
Mim 88 79
Rafi - 91
Sara 95 -
Tuhin 70 -
END
Output
Mim Distinction
Rafi Pass
Sara Pass
Tuhin Fail

Sample 2

Input
A 1 2
END
Output
A Fail
solution.py
Output appears here
Grade Bands with cut · Python practice problem · LearnPy Hub