fixed line spacing
This commit is contained in:
parent
15c08a7de5
commit
c1160874f7
4
uquiz
4
uquiz
|
@ -21,7 +21,7 @@ if len(sys.argv) < 2:
|
||||||
|
|
||||||
filename=subprocess.run(['bash -c "find /home/*/.uquiz/* | grep \'{}\' | head -n 1"'.format(sys.argv[1])], shell=True, stdout=subprocess.PIPE).stdout.decode('utf-8')[:-1]
|
filename=subprocess.run(['bash -c "find /home/*/.uquiz/* | grep \'{}\' | head -n 1"'.format(sys.argv[1])], shell=True, stdout=subprocess.PIPE).stdout.decode('utf-8')[:-1]
|
||||||
|
|
||||||
print('Using "{}"! wrong quiz file? specify a complete path (make sure your quiz file is in a .uquiz/ in a homedir)'.format(filename))
|
print('Using "{}"! wrong quiz file? specify a complete path (make sure your quiz file is in a .uquiz/ in a homedir)\n'.format(filename))
|
||||||
|
|
||||||
answers = []
|
answers = []
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ with open(filename, 'r') as file:
|
||||||
data = json.load(file)
|
data = json.load(file)
|
||||||
print(data["message"])
|
print(data["message"])
|
||||||
for question in data["q"]:
|
for question in data["q"]:
|
||||||
print('Question {}: {}'.format(data["q"].index(question)+1, question['q']))
|
print('\nQuestion {}: {}'.format(data["q"].index(question)+1, question['q']))
|
||||||
for ans in question["o"]:
|
for ans in question["o"]:
|
||||||
print("{}) {}".format(data["t"][question["o"].index(ans)],ans))
|
print("{}) {}".format(data["t"][question["o"].index(ans)],ans))
|
||||||
chosen = 0
|
chosen = 0
|
||||||
|
|
Loading…
Reference in New Issue