Hello I am totally new to python and our last assignment is that we have to create a Gui Application game similar to Hangman. The game allows the user to guess a movie title from hints and allows the player to also guess a letter in the title. Right now I just have the GUI set up. Whatever help you guys can give me will be apperciated. I will attach my Driver and GUI file to this email.
from Tkinter import * class Game(Frame): def __init__(self,master): Frame.__init__(self,master) self.grid() self.create_components() def create_components(self): welcome= Label(self, text = "Guess the movie", font=("Guess the movie", 16)).grid(row = 0,column=1) Tries = Label(self, text = "# of tries left").grid(row = 2, column = 0) self.input_field1=Entry(self) count = 5 self.input_field1.insert(0,count) self.input_field1.grid(row = 3, column = 0) Guess_a_letter= Label(self, text = "Guess a Letter").grid(row = 2, column = 2) self.input_field2=Entry(self) self.input_field2.grid(row = 3, column = 2) self.Submitguess = Button(self, text="submit letter").grid(row=3, column=3) Hint = Label(self, text = "Hint:").grid(row = 4, column = 1) self.input_field3=Entry(self) self.input_field3.grid(row = 5, column = 1) Guess_The_Movie = Label(self, text = "Guess the movie").grid(row = 6, column = 0) self.input_field4=Entry(self) self.input_field4.grid(row = 7, column = 0) self.Submit = Button(self,text="Submit Guess").grid(row=8,column=0) self.Play_Again=Button(self,text="Play Again").grid(row=9,column=1) self.Reset = Button(self,text="Reset").grid(row = 7, column = 2, columnspan=1,sticky = E+W) def Gamelist(self): gamelist=set(open('Projectdatafile.txt')) Game_set= [i.split(",") for i in gamelist]
from Tkinter import Tk from project_classes import Game root= Tk() root.title("Guess the Movie") root.geometry("500x500") application = Game(root) root.mainloop()
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor