diff --git a/Quiz.py b/Quiz.py index 0aa5680..4742b69 100644 --- a/Quiz.py +++ b/Quiz.py @@ -1,6 +1,6 @@ from tkinter import * from tkinter import messagebox -from questions +from questions import * class Project: def __init__(self): @@ -28,8 +28,8 @@ def course(self): def set_(self): if self.que==None: - messageboxshowinfo("Error","Please select course first...") - + messagebox.showinfo("Error","Please select course first...") + return self.count+=1 if self.count==len(self.que): @@ -48,7 +48,7 @@ def set_(self): v[i].set(self.__answer[i]) self.__correct_answer=self.__answer[4] - def fun(self,y,n); + def fun(self,y,n): if y==self.__correct_answer: self.correct+=1 n.config(activebackground="green") @@ -101,4 +101,6 @@ def fun(self,y,n); B.grid(row=10,column=0,columnspan=2,sticky="news") #B.geometry('{0}x{1}+0+0'.format(scr.winfo_screenwidth(),200)) +scr.mainloop() +