A command-line application that calculates employee pay based on hours worked, pay rate, job type, overtime rules, and tax deductions.
- Input validation for hours and pay rate
- Overtime calculation (1.5x pay over 40 hours)
- Job type bonuses:
- Storm → +20%
- Regular → +10%
- Maintenance → No bonus
- Workload status classification based on hours worked
- Tax calculation (20%)
- Net pay calculation
- Clean, formatted output
- Enter employee name
- Enter hours worked
- Enter pay rate
- Enter job type (Storm, Regular, Maintenance)
- Program calculates:
- Gross pay (including overtime)
- Bonus (based on job type)
- Tax withheld
- Net pay
- Workload status
— Pay Summary — Name: John Doe Hours Worked: 45 Pay Rate: $20.00 Job Type: Storm Workload Status: Heavy Workload Gross Pay: $1080.00 Tax Withheld: $216.00 Net Pay: $864.00
- Python 3
- Functions
- Loops (
while) - Conditional logic (
if / elif / else) - String formatting (f-strings)
This project helped reinforce several core programming concepts:
- Breaking a program into smaller, reusable pieces
- Designing functions with a single responsibility
- Separating input, processing, and output logic
- Passing data into functions using parameters
- Returning values instead of printing directly
- Understanding that functions process data, not store it
- Creating variables, passing them into functions, and storing results
- Building a clear step-by-step pipeline:
- Using loops to ensure valid user input
- Preventing invalid values from breaking the program
- Writing clean
if / elifchains - Using step-down comparisons (e.g.,
<=) instead of complex ranges
- Debugging issues related to:
- missing function arguments
- incorrect variable usage
- misplaced logic
- Learning how to simplify messy code into cleaner structure
- Add job type validation (force correct input)
- Show full pay breakdown:
- Base pay
- Overtime pay
- Bonus amount
- Add ability to process multiple employees
- Save results to a file
Wyatt
Computer Science Student | Transitioning into Software Development