Skip to content

Instantly share code, notes, and snippets.

@14sprouj
Created June 14, 2018 17:30
Show Gist options
  • Save 14sprouj/7d98a14a2db8a20df3df9e06aa8194e8 to your computer and use it in GitHub Desktop.
Save 14sprouj/7d98a14a2db8a20df3df9e06aa8194e8 to your computer and use it in GitHub Desktop.
#-------------------------------------------------------------------------------
# Name: GCSE Revision Quiz
# Purpose: To be a revision source for all GCSE subjects
#
# Author: Sprouse; Joel Sprouse
#
# Created: 04/06/2018
# Modified: 04/06/2018
# Copyright: (c) Sprouse 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
##Imports##
import random
from tkinter import *
##Subject Commands##
def EngLang():
subjectsList.append("Eng Lang")
def EngLit():
subjectsList.append("Eng Lit")
def Maths():
subjectsList.append("Maths")
def Biology():
subjectsList.append("Biology")
def Chemistry():
subjectsList.append("Chemistry")
def Physics():
subjectsList.append("Physics")
def IT():
subjectsList.append("ICT")
def BS():
subjectsList.append("Business")
def MS():
subjectsList.append("Media")
def RE():
subjectsList.append("Religious Education")
##Subject Questions Lists##
EngLangQs = [""]
EngLangQs = [""]
EngLangQs = [""]
EngLangQs = [""]
##Program##
root = Tk()
hi = Label(root, text="""Welcome to GCSE Revision Quiz
""")
hi.pack()
#root.mainloop()
v=IntVar()
subjectsList =['']
EngLangQuery = Checkbutton(root, text="English Language", command=EngLang)
EngLangQuery.pack()
EngLitQuery = Checkbutton(root, text="English Literature", command=EngLit)
EngLitQuery.pack()
MathsQuery = Checkbutton(root, text="Maths", command=Maths)
MathsQuery.pack()
BiologyQuery = Checkbutton(root, text="Biology", command=Biology)
BiologyQuery.pack()
ChemistryQuery = Checkbutton(root, text="Chemistry", command=Chemistry)
ChemistryQuery.pack()
PhysicsQuery = Checkbutton(root, text="Physics", command=Physics)
PhysicsQuery.pack()
ITQuery = Checkbutton(root, text="ICT/Computer Science", command=IT)
ITQuery.pack()
MSQuery = Checkbutton(root, text="Media Studies", command=MS)
MSQuery.pack()
BSQuery = Checkbutton(root, text="Business Studies", command=BS)
BSQuery.pack()
REQuery = Checkbutton(root, text="Religious Education", command=RE)
REQuery.pack()
button=Button(root, text="Done", command=root.destroy)
button.pack()
root.mainloop()
#print(subjectsList + " have been selected")
# For testing purposes
if "Eng Lang" in subjectsList:
print(random.choice(EngLangQs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment