A charming, multi-paradigm calculator built with Python and Kivy. This project demonstrates how the same mathematical logic can be implemented using different software architecture styles, all wrapped in a cute, user-friendly interface.
SmartCalculator/
├── ui/
│ └── main.py # Kivy UI entry point
├── paradigms/
│ ├── procedural.py # Procedural paradigm
│ ├── oop_calculator.py # OOP paradigm (Calculator class)
│ ├── functional.py # Functional paradigm
│ └── event_driven.py # Event-driven paradigm
├── extras/
│ └── additional_features.py # Extended math + history
└── README.md
Dark Mode
|
Light Mode
|
History
|
Converter Tab
|
The "Smart" in this calculator comes from its ability to process expressions using four distinct architectural approaches.
- Encapsulation: Logic is bundled within a
Calculatorclass. - Instance-Based: Uses class methods to handle calculations, allowing for future stateful expansions (like memory buttons).
- File:
paradigms/oop_calculator.py
- Pure Functions: Operations take inputs and return outputs without modifying any external state.
- Expression-First: Relies on mapping operators to functions for a clean, mathematical flow.
- File:
paradigms/functional.py
- Linear Execution: Follows a traditional, step-by-step logic flow using standard conditional blocks.
- Simplicity: Minimal overhead, focusing on a direct sequence of parsing commands.
- File:
paradigms/procedural.py
- Signal-Based: Calculation logic is decoupled and triggered by UI interaction events.
- Reactive Flow: Designed to feel responsive and handle data only when the "equals" signal is fired.
- File:
paradigms/event_driven.py
- ✨ Extended Math: Native support for
^(exponent),√(square root), and%(percentage). - 🌓 Theme Toggle: Switch between ☀️ Light and 🌙 Dark modes with a cute toggle.
- 📟 Live Expression Display: Shows the full equation above the result, mimicking a real scientific calculator.
- 🛡️ Smart Error Handling: Captures syntax errors and division by zero gracefully without crashing.
- 📜 Calculation History: Every successful result is logged and can be retrieved via the
additional_featuresmodule.
Make sure you have Python installed, then install the Kivy framework:
pip install -r requirements.txtLaunch the main entry point:
python ui/main.pyThis project is fully compatible with Buildozer. To generate your own Android APK:
- Install Buildozer:
pip install buildozer - In your
buildozer.spec, ensuresource.include_exts = py,kvandrequirements = python3,kivy. - Run the build:
buildozer android debugDeveloped with passion by:
- 🎀 Franchezca Banayad (@chezca-v)
- ✨ Princess Mae Sanchez (@cessamaeeee)
- 👨💻 Jose Jerico Escaño (@Jose-Jerico)
- 🌟 Ysa Frigillana (@ysaf-dev)
- 👩💻 Elena Lanuza (@lenadevug)
- ⚡ Karl Esteban (@krljsph09)
Thanks to all the amazing contributors who have helped make this project better!




