Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Mike Branigan
- # CSC 242-901
- # Lab 4
- #
- # Question 1 #
- from tkinter import Tk, Frame, Button, Entry, Label, RIGHT, LEFT
- class Craps(Frame):
- 'Creates Craps game'
- def __init__(self, parent = None):
- Frame.__init__(self, parent)
- self.parent = parent
- self.pack()
- Craps.make_widget(self)
- def make_widget(self):
- Label(self, text = 'Your roll:').pack()
- Entry(self).pack()
- Button(self, text = 'New game').pack(side = LEFT)
- Button(self, text = 'Roll for point').pack(side = RIGHT)
- root = Tk()
- Craps().mainloop()
- # Question 2 #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement