-
Notifications
You must be signed in to change notification settings - Fork 0
Description
- Typos / Naming
agregate → should be aggregate.
tknter in your README should be tkinter.
More sutable variable names → “suitable.”
- Code Structure
Everything is in a single file with procedural style; could benefit from functions/classes for modularity.
entries and labels classes only contain class-level dictionaries — could use instance variables or proper object-oriented design.
Mixing GUI creation and calculation logic; ideally process() shouldn’t know about widget placement.
- Variable Initialization / Types
output list initialized as ['' for _ in range(10)] but then assigned floats. Could start with zeros: [0.0]*10.
Hardcoding list size 10 — won’t scale if more subjects are added.
- Input Handling
No handling of invalid input — empty fields or non-numeric input will crash.
-1 is used as a placeholder for “no input,” but it’s a magic number with no explanation.
- Calculation / Logic
(total_mark / (100 * num_subjects)) * 100 is unnecessarily complicated; can just be total_mark / num_subjects.
Only counts subjects with != -1.0, but this could be clearer with a named constant or comment.
- GUI Issues
All entries prefilled with -1, which may confuse users.
Aggregate entry is editable; could use state='readonly'.
Grid layout works but could be cleaned up using loops or helper functions.
- Hardcoding
Subject names, row numbers, column numbers are hardcoded.
Output list size is fixed at 10 — adding/removing subjects requires changing multiple lines.
- Miscellaneous
No exception handling — program will crash if any entry is invalid.
No separation of concerns (GUI vs. logic vs. data).
Print statements (print(output), print(agregate)) are left in — fine for debugging but not for production.
No comments explaining why -1 is used.
Inconsistent formatting (spacing, capitalization).
README mentions compiled binaries, but none are provided.