Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. from tkinter import *
  2.  
  3. myWindow = Tk()
  4. myText = StringVar()
  5. myN = StringVar()
  6. myR = StringVar()
  7.  
  8. def myAnswerButton():
  9. myText.set(myN.get())
  10.  
  11. myFactorialButton = Button(myWindow,text="Factorial",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  12. myPermutationButton = Button(myWindow,text="Permutation",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  13. myCombinationsButton = Button(myWindow,text="Combinations",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  14. myGCDButton = Button(myWindow,text="GCD",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  15. myLCMButton = Button(myWindow,text="LCM",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  16. myPrimeButton = Button(myWindow,text="Prime",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  17. myEverythingButton = Button(myWindow,text="Everything",width=20,height=5,fg="DarkOrchid3",font=("Impact","10"),command=lambda:myButtonClicked())
  18.  
  19. myTitle = Label(myWindow,textvariable=myText,width=20,height=3)
  20. myTitle2 = Label(myWindow,text="The Number Theory",width=20,height=3,fg="blue",font=("Script MT Bold","30","underline"))
  21.  
  22. myFirstEntryLabel = Label(myWindow,text="Enter your first number here:",width=40,height=1,fg="DarkOrchid3",font=("Script MT Bold","15","underline"))
  23. myFirstEntry = Entry(myWindow,width=40,textvariable=myN)
  24. mySecondEntryLabel = Label(myWindow,text="Enter your second number here:",width=40,height=1,fg="DarkOrchid3",font=("Script MT Bold","15","underline"))
  25. mySecondEntry = Entry(myWindow,width=40,textvariable=myR)
  26.  
  27.  
  28. myTitle2.grid(row=1,column=1)
  29. myFirstEntryLabel.grid(row=2,column=1)
  30. myFirstEntry.grid(row=2,column=1)
  31. mySecondEntryLabel.grid(row=2,column=2)
  32. mySecondEntry.grid(row=2,column=2)
  33. myFactorialButton.grid(row=3,column=1)
  34. myPermutationButton.grid(row=3,column=2)
  35. myCombinationsButton.grid(row=3,column=3)
  36. myGCDButton.grid(row=4,column=1)
  37. myLCMButton.grid(row=4,column=2)
  38. myPrimeButton.grid(row=4,column=3)
  39. myEverythingButton.grid(row=5,column=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement