From 8d152809e4bed98d09cc1ff0952039c5afa400b5 Mon Sep 17 00:00:00 2001 From: windowsinsiders <72295318+windowsinsiders@users.noreply.github.com> Date: Sat, 3 Oct 2020 13:31:01 +0530 Subject: [PATCH] Fixed Bugs & Errors Fixed Bugs & Errors --- Quiz.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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() +