Created a simple calculator using Tkinter
A fairly simple calculator that is able to use simple mathematical operations and trig functions. There is an input box and ans output box. ValueError and other errors will be produced and outputted into the input box for user to see.
-
Input>
4+20-7Ans>17.0(You can concatenate as much operations as you want, the script will evaulate as you keep pressing the operators, untiloperator.eqis evaluted) -
Input>
ANS+3 / 10Ans>2(You can use previous outputted answer with the 'ANS' button) -
Input>
1 + cos(pi)Ans>0
I tried to incorporate as much flexibility within the input while keeping it simple at the same time.
Please note: This is my first simple python project I have created that involves a GUI. I have made simple scripts in the past that use simulation approaches to solve certain problems (ie: problems relating to physics while I was still in my undergrad). I am still very new to python and the approaches in this script are probably terrible but I tried to use several approaches based on what I have learned so far: For Loops, Classes, Functions and Methods etc.