Bootstrap

Python Tkinter实现的简单计算器

最近初次接触Python,就用计算器来练练手吧。

from tkinter import *
def GetInputValue(ShowNumEntry, Value):#用来显示值
    ShowNumEntry.insert(END,Value)
def GetNumOne():#按钮1并显示
    GetInputValue(ShowNumEntry,"1")
def GetNumTwo():#按钮2并显示
    GetInputValue(ShowNumEntry,"2")
def GetNumThree():#按钮3并显示
    GetInputValue(ShowNumEntry,"3")
def GetNumFour():#按钮4并显示
   GetInputValue(ShowNumEntry,"4")
def GetNumFive():#按钮5并显示
   GetInputValue(ShowNumEntry,"5")
def GetNumSix():#按钮6并显示
   GetInputValue(ShowNumEntry,"6")
def GetNumSeven():#按钮7并显示
    GetInputValue(ShowNumEntry,"7")
def GetNumEight():#按钮8并显示
    GetInputValue(ShowNumEntry,"8")
def GetNumNine():#按钮9并显示
    GetInputValue(ShowNumEntry,"9")
def GetNumZero():#按钮0并显示
    GetInputValue(ShowNumEntry,"0")
def GetDot():#按钮.并显示
    GetInputValue(ShowNumEntry,".")
def GetPlus():#按钮+并显示
    GetInputValue(ShowNumEntry,"
;