Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. # Mike Branigan
  2. # CSC 242-901
  3. # Lab 4
  4. #
  5.  
  6. # Question 1 #
  7.  
  8. from tkinter import Tk, Frame, Button, Entry, Label, RIGHT, LEFT
  9.  
  10.  
  11. class Craps(Frame):
  12. 'Creates Craps game'
  13.  
  14. def __init__(self, parent = None):
  15. Frame.__init__(self, parent)
  16. self.parent = parent
  17. self.pack()
  18. Craps.make_widget(self)
  19.  
  20.  
  21.  
  22. def make_widget(self):
  23. Label(self, text = 'Your roll:').pack()
  24. Entry(self).pack()
  25. Button(self, text = 'New game').pack(side = LEFT)
  26. Button(self, text = 'Roll for point').pack(side = RIGHT)
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. root = Tk()
  34. Craps().mainloop()
  35.  
  36.  
  37.  
  38. # Question 2 #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement