Skip to content

Sudhanshu-Ambastha/Python-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Python Calculator Project

Description

This Python program is a simple 4-function calculator that allows users to perform basic arithmetic operations such as addition, multiplication, and division on two integer numbers. It displays a menu for selecting the desired operation, takes user input for two numbers, and calculates the result based on the chosen operation.

Features

  • Addition: Enter '+' to add two numbers.
  • Multiplication: Enter 'X' (uppercase 'X') to multiply two numbers.
  • Division: Enter '/' to divide two numbers.

Usage

  1. Run the calculator.py script using Python.

  2. You will see a menu with the available operations:

    • Enter '+' for addition.
    • Enter 'X' for multiplication.
    • Enter '/' for division.
  3. Enter two integer numbers as prompted.

  4. Choose the operation you want to perform based on the menu.

  5. The program will calculate and display the result.

Example

Menu:

: Add X : Multiply / : Divide Enter the first integer: 10 Enter the second integer: 5

Choose an operation (+, X, /): X

Result: 50

Try it Online

You can test the program online using Trinket by following this link. https://trinket.io/

Troubleshooting

If you encounter any issues or have questions, please don't hesitate to reach out for support.

Author

Releases

No releases published

Packages

No packages published

Languages