# ----Memory clear button1_1 = tkinter.Button(text='MC', bg='#666', bd=2, command=lambda:pressOperator('MC')) button1_1.place(x=20, y=110, width=50, height=35) # ----Memory read button1_2 = tkinter.Button(text='MR', bg='#666', bd=2, command=lambda:pressOperator('MR')) button1_2.place(x=77.5, y=110, width=50, height=35) # ----Memory save button1_3 = tkinter.Button(text='MS', bg='#666', bd=2, command=lambda:pressOperator('MS')) button1_3.place(x=135, y=110, width=50, height=35) # ----Memory button1_4 = tkinter.Button(text='M ', bg='#666', bd=2, command=lambda:pressOperator('M ')) button1_4.place(x=192.5, y=110, width=50, height=35) # ----Memory - button1_5 = tkinter.Button(text='M-', bg='#666', bd=2, command=lambda:pressOperator('M-')) button1_5.place(x=250, y=110, width=50, height=35) # --第二行 # ----删除单个数字 button2_1 = tkinter.Button(text='del', bg='#666', bd=2, command=lambda:delOne()) button2_1.place(x=20, y=155, width=50, height=35) # ----清除当前显示框内所有数字 button2_2 = tkinter.Button(text='CE', bg='#666', bd=2, command=lambda:clearCurrent()) button2_2.place(x=77.5, y=155, width=50, height=35) # ----清零(相当于重启) button2_3 = tkinter.Button(text='C', bg='#666', bd=2, command=lambda:clearAll()) button2_3.place(x=135, y=155, width=50, height=35) # ----取反 button2_4 = tkinter.Button(text=' /-', bg='#666', bd=2, command=lambda:pressOperator(' /-')) button2_4.place(x=192.5, y=155, width=50, height=35) # ----开根号 button2_5 = tkinter.Button(text='sqrt', bg='#666', bd=2, command=lambda:pressOperator('sqrt')) button2_5.place(x=250, y=155, width=50, height=35) # --第三行 # ----7 button3_1 = tkinter.Button(text='7', bg='#bbbbbb', bd=2, command=lambda:pressNumber('7')) button3_1.place(x=20, y=200, width=50, height=35) # ----8 button3_2 = tkinter.Button(text='8', bg='#bbbbbb', bd=2, command=lambda:pressNumber('8')) button3_2.place(x=77.5, y=200, width=50, height=35) # ----9 button3_3 = tkinter.Button(text='9', bg='#bbbbbb', bd=2, command=lambda:pressNumber('9')) button3_3.place(x=135, y=200, width=50, height=35) # ----除 button3_4 = tkinter.Button(text='/', bg='#708069', bd=2, command=lambda:pressOperator('/')) button3_4.place(x=192.5, y=200, width=50, height=35) # ----取余 button3_5 = tkinter.Button(text='%', bg='#708069', bd=2, command=lambda:pressOperator('%')) button3_5.place(x=250, y=200, width=50, height=35) # --第四行 # ----4 button4_1 = tkinter.Button(text='4', bg='#bbbbbb', bd=2, command=lambda:pressNumber('4')) button4_1.place(x=20, y=245, width=50, height=35) # ----5 button4_2 = tkinter.Button(text='5', bg='#bbbbbb', bd=2, command=lambda:pressNumber('5')) button4_2.place(x=77.5, y=245, width=50, height=35) # ----6 button4_3 = tkinter.Button(text='6', bg='#bbbbbb', bd=2, command=lambda:pressNumber('6')) button4_3.place(x=135, y=245, width=50, height=35) # ----乘 button4_4 = tkinter.Button(text='*', bg='#708069', bd=2, command=lambda:pressOperator('*')) button4_4.place(x=192.5, y=245, width=50, height=35) # ----取导数 button4_5 = tkinter.Button(text='1/x', bg='#708069', bd=2, command=lambda:pressOperator('1/x')) button4_5.place(x=250, y=245, width=50, height=35) # --第五行 # ----3 button5_1 = tkinter.Button(text='3', bg='#bbbbbb', bd=2, command=lambda:pressNumber('3')) button5_1.place(x=20, y=290, width=50, height=35) # ----2 button5_2 = tkinter.Button(text='2', bg='#bbbbbb', bd=2, command=lambda:pressNumber('2')) button5_2.place(x=77.5, y=290, width=50, height=35) # ----1 button5_3 = tkinter.Button(text='1', bg='#bbbbbb', bd=2, command=lambda:pressNumber('1')) button5_3.place(x=135, y=290, width=50, height=35) # ----减 button5_4 = tkinter.Button(text='-', bg='#708069', bd=2, command=lambda:pressOperator('-')) button5_4.place(x=192.5, y=290, width=50, height=35) # ----等于 button5_5 = tkinter.Button(text='=', bg='#708069', bd=2, command=lambda:pressOperator('=')) button5_5.place(x=250, y=290, width=50, height=80) # --第六行 # ----0 button6_1 = tkinter.Button(text='0', bg='#bbbbbb', bd=2, command=lambda:pressNumber('0')) button6_1.place(x=20, y=335, width=107.5, height=35) # ----小数点 button6_2 = tkinter.Button(text='.', bg='#bbbbbb', bd=2, command=lambda:pressDP()) button6_2.place(x=135, y=335, width=50, height=35) # ----加 button6_3 = tkinter.Button(text=' ', bg='#708069', bd=2, command=lambda:pressOperator(' ')) button6_3.place(x=192.5, y=335, width=50, height=35) root.mainloop()
用户评论
推荐下载
-
简易多功能计算器完整版
解决了加减乘除多次输入的缺陷,更实用,不易出错,这是我自己编的,估计是最终版了,或许不会再出新版本,基于对话框,MFC,椭圆按钮
13 2020-06-08 -
用VC制作多功能计算器
本课程设计将实现一个简单计算器。其类似于Windows附件中自带的计算器。这个计算器不仅实现了简单的四则运算功能,还实现了高级的科学计算功能,而且具有简洁大方的图文外观。
19 2019-03-03 -
多功能电子元器件计算器软件
1.方程式支持一元二次,一元一次,二元一次方程求值.支持正负数,小数系数输入,分数系数请先自行转换.2.RC常数RC时间常数是电路里经常用到的.该功能可以计算RC电路上,电容C到某个电压时候的充放电时
29 2019-05-20 -
Qt4.70多功能科学计算器
强大的多功能科学计算器包含了所有计算符号计算、运行正常
52 2019-05-27 -
多功能语音计算器清晰报声
多功能语音计算器,科学型计算器,报声清晰。
26 2019-07-08 -
C#多功能计算器含源码
环境:VS2010C#Winform说明:C#实现的计算器,可以计算N元一次方程、常用表达式等,可添加自定义函数;包含源码;使用:(1)计算表达式:输入:324-sin(2200)+243解答:res
25 2019-07-08 -
多功能数学计算器c#源码
一个c#编写的多功能数学计算器,可完美运行,适合初学者学习。
45 2019-07-10 -
Java模拟多功能计算器设计报告
Java编写的多功能计算器,能+,-,*,/,正余弦,进制转换,开平方,幂,弧度到角的转换,这是我辛苦写了一周的结果。希望大家喜欢!
23 2019-05-13 -
c程序设计多功能计算器
c program design multi-function calculator
24 2019-06-23 -
c#多功能计算器实例源码
c#多功能计算器实例源码功能很强大
24 2019-05-01
暂无评论