Program Console Vignaankosh.com
Execution Panel
Console is empty.
Find lowest scoring student is an interactive PYTHON dry run visualizer from the Dict programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
# Find lowest scoring student
students = {
"John": 85,
"Alice": 92,
"Bob": 78,
"David": 96,
"Emma": 88,
"Sophia": 91,
"Michael": 75
}
print("Student Scores:", students)
# Method 1: Using min() with key
bottom_student = min(students, key=students.get)
bottom_score = students[bottom_student]
print(f"\nLowest Student: {bottom_student} with {bottom_score} marks")
# Method 2: Using items()
bottom_pair = min(students.items(), key=lambda x: x[1])
print(f"Using items(): {bottom_pair[0]} → {bottom_pair[1]}")
# Method 3: Manual iteration
min_student = None
min_marks = float('inf')
for student, marks in students.items():
if marks < min_marks:
min_marks = marks
min_student = student
print(f"Manual method: {min_student} → {min_marks}")
# Method 4: Get failing students (below 80)
failing = {name: score for name, score in students.items() if score < 80}
print(f"\nFailing students (below 80): {failing}")