def buttonsubmit(app): V = 0 A = 0 R = 0 K = 0 if app.Question1.get() == 1: V += 1 elif app.Question1.get() == 2: A += 1 elif app.Question1.get() == 3: R += 1 elif app.Question1.get() == 4: K += 1 else: return 0 if app.Question2.get() == 1: V += 1 elif app.Question2.get() == 2: A += 1 elif app.Question2.get() == 3: R += 1 elif app.Question2.get() == 4: K += 1 else: return 0 if app.Question3.get() == 1: V += 1 elif app.Question3.get() == 2: A += 1 elif app.Question3.get() == 3: R += 1 elif app.Question3.get() == 4: K += 1 else: return 0 if app.Question4.get() == 1: V += 1 elif app.Question4.get() == 2: A += 1 elif app.Question4.get() == 3: R += 1 elif app.Question4.get() == 4: K += 1 else: return 0 if app.Question5.get() == 1: V += 1 elif app.Question5.get() == 2: A += 1 elif app.Question5.get() == 3: R += 1 elif app.Question5.get() == 4: K += 1 else: return 0 answerslist = [V,A,R,K, "VARK"] currentStudent = Student() thisStudent = currentStudent.loadData() currentStudent.add_student(thisStudent[0][0], thisStudent[0][1], thisStudent[0][2], thisStudent[0][3], thisStudent[0][4], answerslist) top.destroy()
def buttonsubmit(app): A = 0 T = 0 P = 0 R = 0 if app.Question1.get() == 1: A += 1 elif app.Question1.get() == 2: T += 1 elif app.Question1.get() == 3: P += 1 elif app.Question1.get() == 4: R += 1 else: print("Please answer all questions") return 0 if app.Question2.get() == 1: A += 1 elif app.Question2.get() == 2: T += 1 elif app.Question2.get() == 3: P += 1 elif app.Question2.get() == 4: R += 1 else: print("Please answer all questions") return 0 if app.Question3.get() == 1: A += 1 elif app.Question3.get() == 2: T += 1 elif app.Question3.get() == 3: P += 1 elif app.Question3.get() == 4: R += 1 else: print("Please answer all questions") return 0 if app.Question4.get() == 1: A += 1 elif app.Question4.get() == 2: T += 1 elif app.Question4.get() == 3: P += 1 elif app.Question4.get() == 4: R += 1 else: print("Please answer all questions") return 0 if app.Question5.get() == 1: A += 1 elif app.Question5.get() == 2: T += 1 elif app.Question5.get() == 3: P += 1 elif app.Question5.get() == 4: R += 1 else: print("Please answer all questions") return 0 answerslist = [A,T,P,R, "HAM"] #Load in the current student from the Student file and Load in the current storage currentStudent = Student() thisStudent = currentStudent.loadData() currentStudent.add_student(thisStudent[0][0], thisStudent[0][1], thisStudent[0][2], thisStudent[0][3], answerslist, thisStudent[0][5]) top.destroy()