Skip to content

sravurimain/Calculator.Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Python Simple Calculator App

This is a simple calculator app built using Python. It allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.

Features

  • Addition: Add two numbers.
  • Subtraction: Subtract one number from another.
  • Multiplication: Multiply two numbers.
  • Division: Divide one number by another, with error handling for division by zero.
  • Exit Option: Allows the user to exit the calculator app.

Getting Started

Prerequisites

You need to have Python 3.x installed on your system. To check if Python is installed, use the following command:

python --version

Installation

  • Clone the repository or download the code files to your local machine
  • Navigate to the project directory
  • Run the python script to start the calculator

Usage

Once the script is running, the calculator will prompt you with a menu of options:

Simple Calculator
1. Add
2. Subtract
3. Multiply
4. Divide
5. Exit
Enter choice (1/2/3/4/5):

You can choose from the following operations:

Addition: Select 1, then input two numbers to add.

Subtraction: Select 2, then input two numbers to subtract.

Multiplication: Select 3, then input two numbers to multiply.

Division: Select 4, then input two numbers to divide (division by zero is handled with an error message).

After choosing an operation, the result will be displayed, and you can perform another calculation or choose to exit the app by selecting 5.

Example

Simple Calculator
1. Add
2. Subtract
3. Multiply
4. Divide
5. Exit
Enter choice (1/2/3/4/5): 1
Enter first number: 10
Enter second number: 5
Result: 15.0

Contact

Saiaashish Ravuri

Email: s.ravurimain@gmail.com

Github: sravurimain

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages