Skip to content

AlphaNOVA23/Calculator.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Calculator.py

This is a Python script that creates a simple calculator using the Tkinter library.

Features:

Performs basic arithmetic operations (addition, subtraction, multiplication, division). Displays calculations in a text box. Allows clearing the display or entering an equals sign to evaluate the expression. Handles errors for invalid expressions.

Installation:

Make sure you have Python installed on your system.

Install the tkinter library if it's not already installed by running: "pip install tkinter"

Usage:

Save the script as calculator.py.

Run the script from your terminal: "python calculator.py"

A window titled "Simple Calculator" will appear with buttons for numbers, operators, and clear/equals functions. Enter your desired calculations and click the buttons to perform them.

Example:

To calculate 2 + 3:

Click the "2" button. Click the "+" button. Click the "3" button. Click the "=" button. The result (5) will be displayed in the calculator window.

Using the Code:

Feel free to modify or extend this script as needed. You can add additional functionalities like memory functions, trigonometry operations, or more advanced calculations.

Snippets

c_1

c_2

c_3

c_4

Author:

Tanmay_Shinde/AlphaNOVA23

About

A simple arithmetic calculator made with python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages