Add licence, AGPL 3.0

This commit is contained in:
Jonathan Harker 2018-11-15 10:42:05 +13:00
parent 789a4bb3fc
commit 51e2707219
2 changed files with 666 additions and 3 deletions

View file

@ -8,6 +8,7 @@ See http://moxquizz.de/ for the original implementation in TCL.
from __future__ import unicode_literals, print_function
from io import open
import re
import sys
class Question:
@ -286,11 +287,13 @@ class QuestionBank:
# A crappy test.
if __name__ == '__main__':
qb = QuestionBank('../questions.doctorlard.en')
qb = QuestionBank('questions.doctorlard.en')
for q in qb.questions:
print(q.question)
a = unicode(raw_input('A: '), 'utf8')
#a = input('A: ') # Python 3
if sys.version.startswith('2'):
a = unicode(raw_input('A: '), 'utf8')
else:
a = input('A: ')
if q.attempt(a):
print("Correct!")
else: