# -*- coding: cp1251 -*-
from Tkinter import *
import math
def calculate_square():
square = float(a.get())**2
square_label.configure(text=square)
root = Tk()
root.title(u'Площадь квадрата')
frame = Frame(root)
frame.pack()
label = Label(root, text =u'Введите размер стороны квадрата:')
label.config(fg = ‘black’, font = ('Verdana', 10))
label.grid(row=1, column=0)
label.pack()
a_entry = Entry(frame, width=10)
a_entry.grid(row=2, column=0)
square_label = Label(frame)
square_label.grid(row=2, column=1)
eval_button = Button(frame, text=u“Вычислить”, width=10, command=calculate_square)
eval_button.grid(row=3, column=0)
exit_button = Button(frame, text=u“Выход”, width=10, command=root.destroy)
exit_button.grid(row=3, column=1)
root.mainloop()