Skip to content

A collection of calculator implementations in Python using various paradigms—OOP, functional programming, decorators, match-case, recursion, and more. Great for exploring core Python concepts through practical examples.

License

Notifications You must be signed in to change notification settings

SaurabhSSB/python-calculator-paradigms

Repository files navigation

🧮 python-calculator-paradigms

A collection of calculator implementations in Python using various paradigms—OOP, functional programming, decorators, match-case, recursion, and more. Great for exploring core Python concepts through practical examples.

🚀 Features

  • ✅ Function-based calculator
  • ✅ OOP with class and static methods
  • ✅ Function and class decorators
  • ✅ Match-case for control flow
  • ✅ Recursion-based logic
  • ✅ Setters & Getters
  • ✅ Exception handling
  • ✅ CLI interaction

📂 Files Overview

File Name Description
calculator_function.py Basic function-based calculator
calculator_class_decorator.py Uses a class-based decorator
calculator_function_decorator.py Uses a function-based decorator
calculator_match_case.py Calculator using match-case statements
calculator_oops.py OOP-based calculator using instance and class methods
calculator_recursive.py Recursive calculator with looped input
calculator_setter_getter.py OOP with properties (getter/setter)
main.py Final integration of multiple concepts

📦 How to Run

python <filename>.py

Each script is standalone. Choose the one you'd like to explore and run it in your terminal or Python environment.

🧠 Ideal For

  • Python beginners learning different paradigms
  • Developers revisiting Python concepts
  • Educational projects or demos

📄 License

This project is for educational purposes. Feel free to use and adapt the code.


🔁 Practice. Compare. Learn. Improve.

About

A collection of calculator implementations in Python using various paradigms—OOP, functional programming, decorators, match-case, recursion, and more. Great for exploring core Python concepts through practical examples.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages