Skip to content

This simple calculator program empowers users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.

Notifications You must be signed in to change notification settings

aaurdanet/Pythonista-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This simple calculator program allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.

Usage

  1. Run the program.
  2. Enter the first number when prompted.
  3. Choose an operation from the available options: + (addition), - (subtraction), * (multiplication), / (division).
  4. Enter the second number.
  5. The result of the calculation will be displayed.
  6. You'll be prompted to continue with the result obtained or start a new calculation.

Code Structure

  • add(n1, n2): Function to perform addition.
  • subtract(n1, n2): Function to perform subtraction.
  • multiply(n1, n2): Function to perform multiplication.
  • divide(n1, n2): Function to perform division.
  • operations: Dictionary containing mapping of operation symbols to their respective functions.
  • calculator(): Function to handle the main calculator functionality.

Requirements

  • Python 3.x
  • art library (install via pip install art)

How to Run

  1. Make sure you have Python installed on your system.
  2. Download art.py from github
  3. Run the script.
  4. Follow the on-screen instructions to perform calculations.

About

This simple calculator program empowers users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages