Егор Хасанов
Member
что тут нитак и как исправить научите меня пожалюста !!!
# -*- coding:utf -8 -*-
__version__ = 'Version:1.0'
from tkinter import *
from tkinter import filedialog as fd
root = Tk()
root.title("Textedit " +str(__version__))
root.resizable(width=False, height=False)
root.geometry("420x300+300+300")
calculated_text = Text(root,height=15, width=50)
what=input("What will we do?(+,-):")
a=float(input("Type your number:"))
b=float(input("Type your number:"))
init()
if what =="+":
c=a+b
print("Result: "+ str(c))
elif what =="-":
c=a-b
print("Result:" + str(c))
else:
print("You choose wrong combination")
scrollb = Scrollbar(root, command=calculated_text.yview)
scrollb.grid(row=4, column=4, sticky='nsew')
calculated_text.grid(row=4, column=0, sticky='nsew', columnspan=3)
calculated_text.configure(yscrollcommand=scrollb.set)
root.mainloop()
# -*- coding:utf -8 -*-
__version__ = 'Version:1.0'
from tkinter import *
from tkinter import filedialog as fd
root = Tk()
root.title("Textedit " +str(__version__))
root.resizable(width=False, height=False)
root.geometry("420x300+300+300")
calculated_text = Text(root,height=15, width=50)
what=input("What will we do?(+,-):")
a=float(input("Type your number:"))
b=float(input("Type your number:"))
init()
if what =="+":
c=a+b
print("Result: "+ str(c))
elif what =="-":
c=a-b
print("Result:" + str(c))
else:
print("You choose wrong combination")
scrollb = Scrollbar(root, command=calculated_text.yview)
scrollb.grid(row=4, column=4, sticky='nsew')
calculated_text.grid(row=4, column=0, sticky='nsew', columnspan=3)
calculated_text.configure(yscrollcommand=scrollb.set)
root.mainloop()