Skip to content

WyBilo/python-paycheck-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Paycheck Analyzer (Python CLI)

A command-line application that calculates employee pay based on hours worked, pay rate, job type, overtime rules, and tax deductions.


🚀 Features

  • 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

🧠 How It Works

  1. Enter employee name
  2. Enter hours worked
  3. Enter pay rate
  4. Enter job type (Storm, Regular, Maintenance)
  5. Program calculates:
    • Gross pay (including overtime)
    • Bonus (based on job type)
    • Tax withheld
    • Net pay
    • Workload status

📌 Example Output

— 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


🛠️ Technologies Used

  • Python 3
  • Functions
  • Loops (while)
  • Conditional logic (if / elif / else)
  • String formatting (f-strings)

📚 What I Learned

This project helped reinforce several core programming concepts:

1. Functions and Structure

  • Breaking a program into smaller, reusable pieces
  • Designing functions with a single responsibility
  • Separating input, processing, and output logic

2. Parameters vs Return Values

  • Passing data into functions using parameters
  • Returning values instead of printing directly
  • Understanding that functions process data, not store it

3. Data Flow in Programs

  • Creating variables, passing them into functions, and storing results
  • Building a clear step-by-step pipeline:

4. Input Validation

  • Using loops to ensure valid user input
  • Preventing invalid values from breaking the program

5. Conditional Logic

  • Writing clean if / elif chains
  • Using step-down comparisons (e.g., <=) instead of complex ranges

6. Problem Solving

  • Debugging issues related to:
  • missing function arguments
  • incorrect variable usage
  • misplaced logic
  • Learning how to simplify messy code into cleaner structure

🔧 Future Improvements

  • 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

👨‍💻 Author

Wyatt
Computer Science Student | Transitioning into Software Development

About

Python CLI tool for calculating employee pay with overtime, job bonuses, tax deductions, and workload analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages