This Python application allows users to enter credit values for university students to determine their academic progression outcomes. It stores results in a text file and visualizes the overall distribution using a histogram with a graphical window.
- Validates user input for
Pass,Defer, andFailcredits. - Determines progression outcomes:
- Progress
- Progress (module trailer)
- Do not progress β module retriever
- Exclude
- Records each outcome in
Marks.txt. - Displays a histogram of outcomes using the
graphics.pymodule.
- Python 3.x
graphics.py(a third-party module based on John Zelle's graphics library)
Download
graphics.pyfrom: https://mcsp.wartburg.edu/zelle/python/ (or your instructor's provided source)
- Place
graphics.pyin the same directory as this script. - Run the script using a Python interpreter:
python progression_visualizer.py- Enter credit values when prompted.
- Press
'y'to enter more data or'q'to quit and view the results. - A graphical window will show a histogram of outcomes.
- The outcomes will also be printed to the console and saved to
Marks.txt.
- Credit values must be one of the following:
0, 20, 40, 60, 80, 100, 120 - The total of Pass + Defer + Fail must equal
120
The program writes each entry to a file named Marks.txt in this format:
Progress - 120 0 0
Do not progress-module retriever - 40 40 40
...
On quitting, a histogram is displayed with labeled bars for each outcome category. Each barβs height represents how many students fall into that category.
Click anywhere inside the histogram window to close it after viewing.
- Be sure the
graphics.pymodule is correctly installed. - Input errors (e.g., strings, out-of-range numbers) are handled gracefully with appropriate messages.
- Developed as part of a Python programming assignment to demonstrate control flow, file I/O, list handling, and graphical output.