Coders Packet

Python program to create a calculator

By Mandar Anil Kulkarni

A simple python calculator which can do basic calculations like addition, multiplication, square root, etc

This program creates the calculator UI with different operator buttons like + , - , = along with different button operands in the form of digits from 0 to 9. The user has to click on the digit buttons and then select the appropriate operator to perform the operation. The calculator UI is developed using Tkinter library.

The first step is to install the required libraries, execute the below command to install the required libraries

pip install tkinter
pip install python-math

The zip file contains .ipynb and .py files

Steps to execute the project :

1. Download the required libraries using the above commands

2. Run the code, calculator UI will pop up, it will contain various widgets(buttons), click in the appropriate operator and operand, for example, to calculate " 10 + 20 "click on button "1" and button "0" followed by "+" button and then click on button "2" and button "0" 

3. Finally click on "=" and the final result will be displayed in the label widget

Download Complete Code


No comments yet

Download Packet

Reviews Report

Submitted by Mandar Anil Kulkarni (MandarK)

Download packets of source code on Coders Packet