Сасун
Evgeniy
Liverpool, United Kingdom (Great Britain)
from tkinter import *


class Main(Frame):
def __init__(self, root):
super(Main, self).__init__(root)
self.build()

def build(self):
self.formula = "0"
self.lbl = Label(text=self.formula, font=("Times New Roman", 21, "bold"), bg="#000", foreground="#FFF")
self.lbl.place(x=11, y=50)

btns = [
"C", "DEL", "*", "=",
"1", "2", "3", "/",
"4", "5", "6", "+",
"7", "8", "9", "-",
"(", "0", ")", "X^2"
]

x = 10
y = 140
for bt in btns:
com = lambda x=bt: self.logicalc(x)
Button(text=bt, bg="#FFF",
font=("Times New Roman", 15),
command=com).place(x=x, y=y,
width=115,
height=79)
x += 117
if x > 400:
x = 10
y += 81

def logicalc(self, operation):
if operation == "C":
self.formula = ""
elif operation == "DEL":
self.formula = self.formula[0:-1]
elif operation == "X^2":
self.formula = str((eval(self.formula))**2)
elif operation == "=":
self.formula = str(eval(self.formula))
else:
if self.formula == "0":
self.formula = ""
self.formula += operation
self.update()

def update(self):
if self.formula == "":
self.formula = "0"
self.lbl.configure(text=self.formula)


if __name__ == '__main__':
root = Tk()
root["bg"] = "#000"
root.geometry("485x550+200+200")
root.title("Калькулятор")
root.resizable(False, False)
app = Main(root)
app.pack()
root.mainloop()
from tkinter import *


class Main(Frame):
def __init__(self, root):
super(Main, self).__init__(root)
self.build()

def build(self):
self.formula = "0"
self.lbl = Label(text=self.formula, font=("Times New Roman", 21, "bold"), bg="#000", foreground="#FFF")
self.lbl.place(x=11, y=50)

btns = [
"C", "DEL", "*", "=",
"1", "2", "3", "/",
"4", "5", "6", "+",
"7", "8", "9", "-",
"(", "0", ")", "X^2"
]

x = 10
y = 140
for bt in btns:
com = lambda x=bt: self.logicalc(x)
Button(text=bt, bg="#FFF",
font=("Times New Roman", 15),
command=com).place(x=x, y=y,
width=115,
height=79)
x += 117
if x > 400:
x = 10
y += 81

def logicalc(self, operation):
if operation == "C":
self.formula = ""
elif operation == "DEL":
self.formula = self.formula[0:-1]
elif operation == "X^2":
self.formula = str((eval(self.formula))**2)
elif operation == "=":
self.formula = str(eval(self.formula))
else:
if self.formula == "0":
self.formula = ""
self.formula += operation
self.update()

def update(self):
if self.formula == "":
self.formula = "0"
self.lbl.configure(text=self.formula)


if __name__ == '__main__':
root = Tk()
root["bg"] = "#000"
root.geometry("485x550+200+200")
root.title("Калькулятор")
root.resizable(False, False)
app = Main(root)
app.pack()
root.mainloop()
現在オフラインです。
完了主義者ショーケース
158
全実績解除
10,864
全実績解除ゲームでの実績
最近のアクティビティ
総プレイ時間:2,303時間
6月20日 に最後にプレイ
総プレイ時間:1.9時間
6月20日 に最後にプレイ
総プレイ時間:2.6時間
6月20日 に最後にプレイ
! yashitory 6月4日 11時23分 
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢎⠱⠊⡱⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠤⠒⠒⠒⠒⠤⢄⣑⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢀⡤⠒⠝⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠲⢄⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢀⡴⠋⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⢰⣢⠐⡄⠀⠉⠑⠒⠒⠒⣄
⠀⠀⠀⣀⠴⠋⠀⠀⠀⡎⠀⠘⠿⠀⠀⢠⣀⢄⡢⠉⣔⣲⢸⠀⠀⠀⠀⠀⠀⢘
⡠⠒⠉⠀⠀⠀⠀⠀⡰⢅⠫⠭⠝⠀⠀⠀⠀⠀⠀⢀⣀⣤⡋⠙⠢⢄⣀⣀⡠⠊
⢇⠀⠀⠀⠀⠀⢀⠜⠁⠀⠉⡕⠒⠒⠒⠒⠒⠛⠉⠹⡄⣀⠘⡄⠀⠀⠀⠀⠀⠀
⠀⠑⠂⠤⠔⠒⠁⠀⠀⡎⠱⡃⠀⠀⡄⠀⠄⠀⠀⠠⠟⠉⡷⠁⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠤⠤⠴⣄⡸⠤⣄⠴⠤⠴⠄⠼⠀
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3486382446
! yashitory 5月23日 11時42分 
⠀⛧ ⛤ ⛧ ⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧
⛧ ⛤ ⛧ ⛤ ⛧ ⠀⠀⛧ ⛤ ⛧ ⛤ ⛧
⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤
⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⛧
ʀᴀᴛᴇ ᴍʏ ᴀʀᴛᴡᴏʀᴋ ᴘʟᴇᴀsᴇ ---> https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3486375003
! yashitory 5月10日 7時45分 
⠀⣠⣶⡿⠿⠿⠷⢦⡀⠀⢀⡴⠾⠿⠿⢿⣶⣄⠀
⣼⡿⠁⢀⣤⣶⣦⣤⡙⠤⢋⣤⣴⣶⣦⡄⠈⢿⣧
⣿⡇⢀⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⡀⢸⣿
⢹⣇⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣸⡏
⠀⠻⣆⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⣰⠟⠀
⠀⠀⠈⠳⣄⠙⢿⣿⣿⣿⣿⣿⡿⠛⣡⠞⠁⠀⠀
⠀⠀⠀⠀⠈⠻⣦⡙⢿⣿⣿⠋⣠⠞⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⠻⣆⠛⣡⠞⠁⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠿⠃⠀
ʀᴀᴛᴇ ᴍʏ ᴀʀᴛᴡᴏʀᴋ ᴘʟᴇᴀsᴇ ---> https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3473322304
! yashitory 5月2日 6時16分 

ʀᴀᴛᴇ ᴍʏ ᴀʀᴛᴡᴏʀᴋ ᴘʟᴇᴀsᴇ - https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3307270316
! yashitory 4月30日 9時31分 
⠀⛧ ⛤ ⛧ ⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧
⛧ ⛤ ⛧ ⛤ ⛧ ⠀⠀⛧ ⛤ ⛧ ⛤ ⛧
⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤
⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⛧ ⛤ ⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⠀⠀⛧ ⛤ ⛧
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⛧
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3473313687
TavikeA 4月25日 11時47分 
+rep OWO