Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- myWindow = Tk()
- myText = StringVar()
- myN = StringVar()
- myR = StringVar()
- def myAnswerButton():
- myText.set(myN.get())
- myFactorialButton = Button(myWindow,text="Factorial",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myPermutationButton = Button(myWindow,text="Permutation",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myCombinationsButton = Button(myWindow,text="Combinations",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myGCDButton = Button(myWindow,text="GCD",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myLCMButton = Button(myWindow,text="LCM",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myPrimeButton = Button(myWindow,text="Prime",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myEverythingButton = Button(myWindow,text="Everything",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
- myTitle = Label(myWindow,textvariable=myText,width=20,height=3)
- myTitle2 = Label(myWindow,text="The Number Theory",width=20,height=3,fg="blue",font=("Script MT Bold","30","underline"))
- myFirstEntryLabel = Label(myWindow,text="Enter your first number here:",width=40,height=1,fg="DarkOrchid3",font=("Script MT Bold","15","underline"))
- myFirstEntry = Entry(myWindow,width=40,textvariable=myN)
- mySecondEntryLabel = Label(myWindow,text="Enter your second number here:",width=40,height=1,fg="DarkOrchid3",font=("Script MT Bold","15","underline"))
- mySecondEntry = Entry(myWindow,width=40,textvariable=myR)
- myTitle2.grid(row=1,column=1)
- myFirstEntryLabel.grid(row=2,column=1)
- myFirstEntry.grid(row=2,column=1)
- mySecondEntryLabel.grid(row=2,column=2)
- mySecondEntry.grid(row=2,column=2)
- myFactorialButton.grid(row=3,column=1)
- myPermutationButton.grid(row=3,column=2)
- myCombinationsButton.grid(row=3,column=3)
- myGCDButton.grid(row=4,column=1)
- myLCMButton.grid(row=4,column=2)
- myPrimeButton.grid(row=4,column=3)
- myEverythingButton.grid(row=5,column=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement