Skip to content

Divyesh-20/Simple-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Simple Calculator

This is a basic command-line calculator that performs arithmetic operations. It allows the user to perform multiple calculations consecutively, with options for addition, subtraction, multiplication, and division.

Features

Addition, Subtraction, Multiplication, and Division: Select the type of operation to perform. Input Validation: Ensures that inputs are valid numbers. Division by Zero Handling: Safely handles division by zero with an error message. Repeat Calculations: After each calculation, you can choose to perform another calculation or exit.

Prerequisites To run this program,

you need to have Python installed on your machine. You can download it Python

Example Usage

Simple Calculator Select operation:

  1. Addition
  2. Subtraction
  3. Multiplication
  4. Division

Enter the number of the operation (1/2/3/4): 1 Enter the first number: 10 Enter the second number: 5 The result is: 15.0 Do you want to perform another calculation? (yes/no): yes

Select operation:

  1. Addition
  2. Subtraction
  3. Multiplication
  4. Division

Enter the number of the operation (1/2/3/4): 4 Enter the first number: 10 Enter the second number: 0 The result is: Error! Division by zero. Do you want to perform another calculation? (yes/no): no Thank you for using the calculator. Goodbye!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages