# 制作简单计算器 **Repository Path**: tang_qianyuans_team/making_a_simple_calculator ## Basic Information - **Project Name**: 制作简单计算器 - **Description**: 简单计算器的制作,制作一个具有加减乘除,清除,归零等功能的简单计算器 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-01-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README from tkinter import * root = Tk() root.title("python计算器") root.resizable(0,0) root.geometry("340x520") result = StringVar() result.set('') process = StringVar() process.set('') But_cmp=Button(root,text='=',font = ('微软雅黑',20),bg='red',command=lambda:comput()).place(x=100,y=420,width=240,height=100) But_point=Button(root,text='AC',font = ('微软雅黑',20),bg='orange',command=lambda:press('AC')).place(y=420,width=100,height=100) But_AC=Button(root,text='.',bg='orange',font = ('微软雅黑',15),command=lambda:press('.')).place(x=0,y=420-1*80,width=80,height=80) But0=Button(root,text='0',bg='orange',font = ('微软雅黑',12),command=lambda:press('0')).place(x=0+1*80,y=420-1*80,width=80,height=80) But_back=Button(root,text='dl',bg='orange',font = ('微软雅黑',15),command=lambda:press('b')).place(x=0+2*80,y=420-1*80,width=80,height=80) But_division=Button(root,text='/',font = ('微软雅黑',15),bg=('grey'),command=lambda:press('/')).place(x=0+3*80,y=420-1*80,width=100,height=80) But1=Button(root,text='1',bg='orange',font = ('微软雅黑',12),command=lambda:press('1')).place(x=0,y=420-2*80,width=80,height=80) But2=Button(root,text='2',bg='orange',font = ('微软雅黑',12),command=lambda:press('2')).place(x=0+1*80,y=420-2*80,width=80,height=80) But3=Button(root,text='3',bg='orange',font = ('微软雅黑',12),command=lambda:press('3')).place(x=0+2*80,y=420-2*80,width=80,height=80) But_multi=Button(root,text='*',font = ('微软雅黑',15),bg=('grey'),command=lambda:press('*')).place(x=0+3*80,y=420-2*80,width=100,height=80) But4=Button(root,text='4',bg='orange',font = ('微软雅黑',12),command=lambda:press('4')).place(x=0,y=420-3*80,width=80,height=80) But5=Button(root,text='5',bg='orange',font = ('微软雅黑',12),command=lambda:press('5')).place(x=0+1*80,y=420-3*80,width=80,height=80) But6=Button(root,text='6',bg='orange',font = ('微软雅黑',12),command=lambda:press('6')).place(x=0+2*80,y=420-3*80,width=80,height=80) But_sub=Button(root,text='-',font = ('微软雅黑',15),bg=('grey'),command=lambda:press('-')).place(x=0+3*80,y=420-3*80,width=100,height=80) But7=Button(root,text='7',bg='orange',font = ('微软雅黑',12),command=lambda:press('7')).place(x=0,y=420-4*80,width=80,height=80) But8=Button(root,text='8',bg='orange',font = ('微软雅黑',12),command=lambda:press('8')).place(x=0+1*80,y=420-4*80,width=80,height=80) But9=Button(root,text='9',bg='orange',font = ('微软雅黑',12),command=lambda:press('9')).place(x=0+2*80,y=420-4*80,width=80,height=80) But_add=Button(root,text='+',font = ('微软雅黑',15),bg=('grey'),command=lambda:press('+')).place(x=0+3*80,y=420-4*80,width=100,height=80)