Mahmud-Kandawala / Python-Kivy-Calculator-App

A cross-platform mobile calculator app built with Python and Kivy, compatible with Android and iOS. Features include an intuitive UI, basic arithmetic operations, and performance optimization through EXE conversion. Demonstrates Python's capabilities in mobile app development.

Repository from Github https://github.comMahmud-Kandawala/Python-Kivy-Calculator-AppRepository from Github https://github.comMahmud-Kandawala/Python-Kivy-Calculator-App

Python-Kivy-Calculator App

Overview

The Python-Kivy-Calculator is a cross-platform mobile application developed using Python and the Kivy framework. This project demonstrates the creation of a basic yet functional calculator app, capable of running on both Android and iOS devices. The primary objective is to highlight the flexibility and power of Python in mobile app development and provide users with a seamless and efficient experience by converting the Python script into an executable (EXE) file.

Motivation

The motivation behind this project is to explore the capabilities of Python in the realm of mobile app development. By creating a calculator app, we aim to showcase the ease with which Python, combined with the Kivy framework, can be used to develop cross-platform applications. This project also serves as a learning opportunity to understand the intricacies of mobile app development and deployment on different platforms.

Purpose

The purpose of this project is to provide a simple, yet functional calculator app that demonstrates core arithmetic operations. It is designed to offer an intuitive user interface and smooth performance, making it an ideal example for those looking to understand mobile app development using Python.

Features

  • Cross-Platform Compatibility: Fully functional on both Android and iOS devices.
  • User-Friendly Interface: Designed with intuitive and visually appealing elements using Kivy.
  • Performance Optimization: Python script converted to an EXE file for enhanced performance and smoother user experience.
  • Core Calculator Functions: Supports basic arithmetic operations including addition, subtraction, multiplication, and division.
  • Error Handling: Includes basic error handling to ensure the app runs smoothly without crashes.

Learning Outcomes

This project covers several essential aspects of mobile app development, including:

  • Python App Development: Understanding the fundamentals of building applications using Python.
  • Mobile App Creation: Using Python to create mobile applications and convert scripts to EXE files.
  • Kivy Framework: Learning how to use Kivy and KivyMD to build and design mobile applications.
  • UI/UX Design: Implementing beautiful design elements such as labels, layouts, and images in Kivy.
  • Cross-Platform Deployment: Building and deploying mobile applications on both Android and iOS platforms.

Data Flow

The data flows through the application in a straightforward manner. User inputs are captured through the interface, processed by the Python script, and the results are displayed back to the user. The Kivy framework handles the user interface elements, while the core arithmetic logic is implemented in Python.

Prioritization

Tackled:

  1. Core Functionality: Ensuring the basic arithmetic operations work correctly.
  2. User Interface: Creating an intuitive and visually appealing design.
  3. Cross-Platform Support: Making sure the app runs on both Android and iOS.
  4. Performance Optimization: Converting the Python script to an EXE for better performance.

Not Tackled:

  1. Advanced Features: Features like scientific calculations or graph plotting were not included to maintain simplicity.
  2. Backend Integration: No backend services were integrated as the focus was on the core functionality and UI/UX.

These decisions were made to keep the project scope manageable and focus on delivering a polished core product.

Notable Features

  • Cross-platform compatibility
  • User-friendly interface
  • Basic arithmetic operations
  • Performance optimization through EXE conversion

Lessons Learned

Throughout the development of this project, several important lessons were learned:

  • Framework Familiarity: Gained a deep understanding of the Kivy framework and its capabilities.
  • Cross-Platform Challenges: Learned about the challenges of ensuring compatibility across different operating systems.
  • UI/UX Design: Appreciated the importance of designing an intuitive and visually appealing interface.
  • Performance Optimization: Understood the benefits and techniques of optimizing a Python script for better performance.

Problems Faced and Solutions

Problems:

  1. Cross-Platform Compatibility: Ensuring the app worked seamlessly on both Android and iOS was challenging due to differences in platform-specific requirements.
  2. Performance Issues: The initial Python script was not optimized for mobile performance.

Solutions:

  1. Kivy Framework: Leveraged the Kivy framework’s built-in support for cross-platform development to address compatibility issues.
  2. Script Optimization: Converted the Python script into an EXE file to improve performance and reduce execution time.

Screenshots

Calculator Screen

Calculator Screen

Addition Screen

Addition Screen

Total Screen

Total Screen

Setup

To set up the project, follow these steps:

  1. Install Python: Ensure you have the latest version of Python installed. You can download it from the official Python website.
  2. Install Kivy: Install the Kivy framework using pip.
    pip install kivy
  3. Install KivyMD: Install the KivyMD library using pip.
    pip install kivymd

Running the Application

To run the application, follow these steps:

  1. Clone the Repository: Clone this repository to your local machine.
    git clone https://github.com/your-username/python-kivy-calculator.git
  2. Navigate to the Project Directory:
    cd python-kivy-calculator
  3. Run the Python Script: Execute the main Python script to launch the application.
    python main.py

Viewing the App

For an enhanced user experience, download and run the EXE file located in the EXE folder named "Main".

About

A cross-platform mobile calculator app built with Python and Kivy, compatible with Android and iOS. Features include an intuitive UI, basic arithmetic operations, and performance optimization through EXE conversion. Demonstrates Python's capabilities in mobile app development.


Languages

Language:Python 65.6%Language:CSS 20.0%Language:kvlang 9.3%Language:JavaScript 3.4%Language:TeX 1.6%Language:GLSL 0.2%