Skip to content

A python program that will ask user to choose one of the math operations and then asks for two numbers to compute afterwards. See demon at:

Notifications You must be signed in to change notification settings

Irish-C/simple-app-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Simple App Calculator

This simple app calculator with exception handling will prompt the user to perform one of the four math operations of two numbers repeatedly until they want to exit.

Math operations are:

  • Addition
  • Subtraction
  • Multiplication
  • Division

Installation

To run the program, you'll need to have Python 3 installed on your computer.

Note: This program might works only for windows os.


I used VS Code to create and run the program.

Dependencies

The script requires the following Python packages:

  • PySimpleGUI

pip install pySimpleGUI


How to make this code works

  1. Clone the repository or download the simple_app_calculator.py here.
  2. Open a terminal and navigate to the directory containing the script: cd /path/to/directory
  3. Run the script using python: python simple_app_calculator.py

How does the app works

  1. Select from the four math operations
  • If user did not select, the math operation error will appear.
  1. Enter first number and second number.
  • If user did not enter or entered an invalid value, the Invalid number error will appear.
  • If the user entered 0 as second number as divisor, the zero division error will appear.
  1. Click 'Submit' button and the result will appear.
  2. Click 'OK' button and the app will ask if you want to try again.
  • If yes, the program will start again.
  • If no, the program will say 'Thank You!'. Click Exit to terminate the program.
  1. The program will run as long as you click 'yes' button and ill terminate if 'no' or exiting the window.

About

A python program that will ask user to choose one of the math operations and then asks for two numbers to compute afterwards. See demon at:

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages