Calculator in python
Hello Friends! NUPUR BANSAL I made a calculator using Tkinter Here's the code: from tkinter import * import parser root = Tk() root.title('Calculator') i = 0 def factorial(): """Calculates the factorial of the number entered.""" whole_string = display.get() number = int(whole_string) fact = 1 counter = number try: while counter > 0: fact = fact*counter counter -= 1 clear_all() display.insert(0, fact) except Exception: clear_all() display.insert(0, "Error") def clear_all(): """clears all the content in the Entry widget""" display.delete(0, END) def ...