Skip to content

Instantly share code, notes, and snippets.

View Ved-programmer's full-sized avatar
🎯
Focusing

Ved Rathi Ved-programmer

🎯
Focusing
View GitHub Profile
@Ved-programmer
Ved-programmer / Compact Calculator.py
Last active October 26, 2023 04:25
Compact Calculator by Ved The Pro
from tkinter import *
from math import *
root, WIDTH, HEIGHT = Tk(), 872, 630
root.geometry(f"{WIDTH}x{HEIGHT}");root.title("Ved The Pro Calculator")
calculationStringFrame = Frame(root);calculationStringFrame.place(x = 0, y = 0, width = WIDTH, height = 100)
calculationOutput = Label(calculationStringFrame, bg = "black", fg = "yellow", text = "", font = ("", 50));calculationOutput.pack(fill = X)
calcButtons = Frame(root);calcButtons.place(x = 0, y = 100)
buttonLayout = [["+", "-", "*", "/"], ["1", "2", "3", "4"], ["5", "6", "7", "8"], ["9", "0", "=", "b"], ["c", "factorial", "**", ","], ["(", ")", "lcm", "gcd"]]
buttonFuncLayoutString = ""
for i in buttonLayout: