Pass or Fail Report
Python
25 pts
Pass or Fail Report
Use this dictionary:
marks = {"Selam": 88, "Abel": 45, "Merhawi": 91, "Lidya": 38}
- Create an empty list called
passed. - Loop with
items(). A mark of 50 or more is a pass. PrintName - PASSorName - FAIL, and append the names of the students who passed topassed. - After the loop, print
Passed: X of Y, usinglen()for both numbers.
Expected output:
Selam - PASS Abel - FAIL Merhawi - PASS Lidya - FAIL Passed: 2 of 4
Checklist
- Loop through
marksand add the names of the students who passed topassed. - Print
PASSorFAILfor each student, then the summary line.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
