previndexinfonext

code guessing, round #75 (completed)

started at ; stage 2 at ; ended at

specification

this is jeopardy! I would like to be quizzed, thanks. submissions may be written in any language.

there are many different types of quiz and we are accepting all of them, from "how well do you know yuri?" to "what colour power ranger are you?". each question might have a correct answer, or might be a matter of opinion. they may be multiple-choice, true-false, somehow freeform, or they might take input in the form of handwritten drawings. the answer at the end might be a letter grade, a colour from yellow to blue, or simply the particular species of armadillo I am.

as any language is allowed, and this problem is open-ended, there is no fixed API.

quiz answers

during stage 1, this page had an interactive quiz about cg history that players could fill out. the correct answers for that quiz are below.

leaderboard

namecorrect answers
LyricLy10/10
Dolphy7/10
ultlang7/10
essaie7/10
GNU Radio Shows7/10
mat~6/10
rrebeccca6/10
oleander6/9
hazel6/10
xiaowow_5/10
kimapr5/10
moshikoi5/10
jetison3334/10
ponydork4/10
Camto3/10
Makefile_dot_in3/10
olive2/10
taswelll0/0
minecalftree0/0
yeti0/0

results

  1. 👑 essaie +1 -0 = 1
    1. Dolphy (was rebbbbeccca)
    2. oleander
    3. Makefile_dot_in (was yeti)
    4. ponydork (was Makefile_dot_in)
    5. yeti (was ponydork)
    6. rebbbbeccca (was Dolphy)
  2. yeti +1 -1 = 0
    1. essaie (was rebbbbeccca)
    2. ponydork (was essaie)
    3. oleander
    4. Dolphy (was Makefile_dot_in)
    5. Makefile_dot_in (was ponydork)
    6. rebbbbeccca (was Dolphy)
  3. rebbbbeccca +0 -0 = 0
    1. Makefile_dot_in (was essaie)
    2. essaie (was oleander)
    3. ponydork (was yeti)
    4. Dolphy (was Makefile_dot_in)
    5. yeti (was ponydork)
    6. oleander (was Dolphy)
  4. Makefile_dot_in +0 -0 = 0
    1. ponydork (was rebbbbeccca)
    2. oleander (was essaie)
    3. essaie (was oleander)
    4. Dolphy (was yeti)
    5. yeti (was ponydork)
    6. rebbbbeccca (was Dolphy)
  5. ponydork +0 -0 = 0
    1. Makefile_dot_in (was rebbbbeccca)
    2. rebbbbeccca (was essaie)
    3. essaie (was oleander)
    4. Dolphy (was yeti)
    5. oleander (was Makefile_dot_in)
    6. yeti (was Dolphy)
  6. Dolphy +0 -0 = 0
    1. yeti (was rebbbbeccca)
    2. oleander (was essaie)
    3. rebbbbeccca (was oleander)
    4. Makefile_dot_in (was yeti)
    5. ponydork (was Makefile_dot_in)
    6. essaie (was ponydork)
  7. oleander +1 -2 = -1
    1. essaie (was rebbbbeccca)
    2. ponydork (was essaie)
    3. yeti
    4. Dolphy (was Makefile_dot_in)
    5. Makefile_dot_in (was ponydork)
    6. rebbbbeccca (was Dolphy)

entries

you can download all the entries

entry #1

written by rebbbbeccca
submitted at
1 like

guesses
comments 0

post a comment


submission.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3

def Main():
	print("Which Teenage Mutant Ninja Turtle are you?")
	print("Question 1: which Teenage Mutant Ninja Turtle are you?")
	Turtles = ["Leonardo","Raphael","Donatello","Michaelangelo"]
	SelectedTurtleName = None
	while SelectedTurtleName == None:
		TurtleName = input("Enter a Teenage Mutant Ninja Turtle >>>")
		if any([PossibleTurtleName == TurtleName for PossibleTurtleName in Turtles]):
			SelectedTurtleName = TurtleName
		else:
			print("Sorry, I don't know about a Teenage Mutant Ninja Turtle with that name! Please try again.")
	print("We have determined which Teenage Mutant Ninja Turtle you are!")
	print("You are....")
	print(SelectedTurtleName)

if __name__ == "__main__":
	Main()

entry #2

written by essaie
submitted at
0 likes

guesses
comments 3
Makefile_dot_in ¶

what is 6 times 9?


oleander ¶

how many roads must a man walk?


cdr sa ¶

how many lIcks does It take to get to the centaur of a funko pop


post a comment


jeopardy.js ASCII text, with no line terminators
1
[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]

entry #3

written by oleander
submitted at
1 like

guesses
comments 0

post a comment


quiz.rs ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use std::io;

fn main() {
println!("This is a full recreation of the official Warrior Cats clan quiz.
https://web.archive.org/web/20140413215631/http://www.warriorcats.com/games-and-extras/extras/starclan-clanname
");

let questions = vec![
"1.  Following the rules is important to you",
"2.  You like decorating your room with posters and stickers",
"3.  Your friends consider you a fast runner",
"4.  If a classmate was unfairly accused of cheating you would help defend their reputation",
"5.  You prefer to keep to yourself",
"6.  If at first you don't succeed, try, try again",
"7.  During the summer you like to spend as much time swimming as possible",
"8.  You like to stay up late at night",
"9.  You snooze, you lose",
"10. You can easily sneak up on a friend without them hearing",
"11. You enjoy board games and cross-word puzzles",
"12. You would always rather be outside in the fresh air",
"13. If you were at a theme park with your friends, you would be the first try the scariest roller coaster",
"14. You dream of one day owning a boat",
"15. You prefer to wear black over any other color",
"16. Loyalty in a friendship is very important to you
This is your last question. Time to consult StarClan"];
let clans = vec![
"Based on your answers, StarClan has determined your belong in ThunderClan.
You are a member of the ThunderClan. You are brave and loyal and will always stand up for what is right.",
"Based on your answers, StarClan has determined your belong in RiverClan.
You are a member of the RiverClan. You are clever and graceful and love the beauty of water.",
"Based on your answers, StarClan has determined your belong in WindClan.
You are a member of the WindClan. You are swift and loyal and love being outside to smell the fresh air.",
"Based on your answers, StarClan has determined your belong in ShadowClan.
You are a member of the ShadowClan. You are ambitious and proud and enjoy being independent."];
let key = vec![0, 1, 2, 0, 3, 2, 1, 3, 3, 0, 1, 2, 0, 1, 3, 2];
loop{
println!("Answer these questions to find out what Clan StarClan thinks you belong in");
let mut score = vec![0, 0, 0, 0];
let mut answer = String::new();

for question in 0..16 {
println!("{}", questions[question]);
loop{
	println!("Please answer 1 (Strongly Disagree), 2 (Disagree), 3 (Neutral), 4 (Agree), or 5 (Strongly Agree)");
	answer = String::new();
	io::stdin().read_line(&mut answer);
	if answer.trim() == "1"{score[key[question]] = score[key[question]]-2; break;}
	if answer.trim() == "2"{score[key[question]] = score[key[question]]-1; break;}
	if answer.trim() == "3"{break;}
	if answer.trim() == "4"{score[key[question]] = score[key[question]]+1; break;}
	if answer.trim() == "5"{score[key[question]] = score[key[question]]+2; break;}
}
}

let mut win = 0;
for i in 1..4 {
	if score[i] > score[win]{win = i;}
}

let mut result = clans[win];
for i in 0..4 {
	if score[i] == score[win] && i!=win{result = "StarClan is unable to determine your clan at this time. Try again.
	";}
}

println!("{}", result);
if result.starts_with("Based"){break;}
}
}

entry #4

written by yeti
submitted at
0 likes

guesses
comments 0

post a comment


main.asm ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
section .text
print: ;str, len
mov rdx, rsi
mov rsi, rdi
mov rax, 1
mov rdi, 1
syscall
ret
input:
mov rax, 0
mov rdi, 0
mov rsi, inputBuf
mov rdx, 1024
syscall
dec rax
ret
global _start
_start:
mov rcx, 17
mov rdi, first_name
.loop:
mov al, [rdi]
add al, 0x60
mov [rdi], al
inc rdi
loop .loop
mov rdi, q1
mov rsi, q1_len
call print
call input
mov rcx, first_name_len
mov rdi, first_name
mov rsi, inputBuf
rep cmpsb
jne say_wrong
mov rdi, correct
mov rsi, correct_len
call print
mov rdi, q2
mov rsi, q2_len
call print
call input
mov rcx, last_name_len
mov rdi, last_name
mov rsi, inputBuf
rep cmpsb
jne say_wrong
mov rdi, correct
mov rsi, correct_len
call print
mov rdi, thanks
mov rsi, thanks_len
call print
exit:
mov rax, 60
mov rdi, 1
syscall
say_wrong:
mov rdi, wrong
mov rsi, wrong_len
call print
jmp exit
section .data
q1: db "im thinking of a cool person. what is their first name? "
q1_len: equ $-q1
q2: db "what is their last name? "
q2_len: equ $-q2
thanks: db "thank you for doing my quiz", 10
thanks_len: equ $-thanks
correct: db "correct", 10
correct_len: equ $-correct
wrong: db "wrong", 10
wrong_len: equ $-wrong
first_name: db 10, 21, 19, 20, 9, 14, 5
first_name_len: equ $-first_name
last_name: db 6, 18, 9, 19, 3, 8, 13, 1, 14, 14
last_name_len: equ $-last_name
char: db 0
inputBuf: times 1024 db 0

entry #5

written by Makefile_dot_in
submitted at
1 like

guesses
comments 0

post a comment


75cg.janet ASCII text, with very long lines (2278), with CRLF line terminators
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# You need janet spork mpv yt-dlp
(import spork/base64)
(import spork/rawterm)
(import spork/utf8)
(import spork/sh)

# Spoilers!
(def questions "ICBbQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PTdKTkZiTG1sU1VZIiA6YW5zd2VyICJMYWd0cmFpbiIgOmNvbW1lbnQgImhpIDozIn0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PXNiS1hpemo1V1U4IiA6YW5zd2VyICJUd28gWWVhcnMifQogICBAezp1cmwgImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZGxBZUVjVm5udm8iIDphbnN3ZXIgIll1a2FpIFlvdW5nIn0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWhsZ2MzXzRXTDBNIiA6YW5zd2VyICJNb25vcmFsIn0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWRQNHRfR0dsM0VzIiA6YW5zd2VyICJpbm5lciB1bml2ZXJzZSJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj16aGwtQ3MxLXNHNCIgOmFuc3dlciAiR2lvcmdpbyBieSBNb3JvZGVyIn0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PXRueVJCdVNzSXAwIiA6YW5zd2VyICJCYWthIG1pdGFpIGJ1dCBpdCdzIGluIHRva2kgcG9uYSJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1QUmhqcVBDUEF0cyIgOmFuc3dlciAiWWFlZ2FraSJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1hMERielVlLXI0USIgOmFuc3dlciAiSGVsaWtvcHRlciJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1hNXVRTXdSTUhjcyIgOmFuc3dlciAiSW5zdGFudCBDcnVzaCJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1sdXRxSnpHZlFNQSIgOmFuc3dlciAiZmVtaW5pbmUgYWRvcm5tZW50cyJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1jUG5URmRNcFZzOCIgOmFuc3dlciAiSSBIYXZlbid0IEdvdCBBbnkgTGVncyJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj0tMXRYSlc5Q01aMCIgOmFuc3dlciAiVGhlcmUgSXMgQSBMaWdodCBUaGF0IE5ldmVyIEdvZXMgT3V0In0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PTFHYjJFVDk5TTNrIiA6YW5zd2VyICJrYWxhIGxpbGkgbGkga2FtYSB0YW4gbWEifQogICBAezp1cmwgImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9RVdITU5JQ3JDZjgiIDphbnN3ZXIgInN1c3N5IG1hY2hpbmUifQogICBAezp1cmwgImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9T3VpVEhNdXZxVDQiIDphbnN3ZXIgIkNhbmNpb24gZGVsIG1hcmlhY2hpIn0KICAgQHs6dXJsICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVlub3BIQ0wxSms4IiA6YW5zd2VyICJEcmFnb3N0ZWEgRGluIFRlaSJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1IaFphSGY4UlA2ZyIgOmFuc3dlciAiVmVyaWRpcyBRdW8ifQogICBAezp1cmwgImh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9aHF0aHNwU0taVjgiIDphbnN3ZXIgIklldmFuIHBvbGtrYSJ9CiAgIEB7OnVybCAiaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1LNUtBYzVDb0N1ayIgOmFuc3dlciAiRGVybmllcmUgRGFuc2UifV0=")
(def questions (parse (base64/decode questions)))

(def man0 "_________")
(def man
  ["   |\n   |\n   |"
   "\n _____\n|     |\n|     |\n|     |\n-----"
   "\n   |\n   |"
   "\n  /"
   " \\"
   "\n /"
   "   \\"])


(def mpv (os/spawn ["mpv"
  "--input-ipc-server=/tmp/mpv-quiz.socket"
  "--keep-open=always"
  "--no-video"
  "--no-terminal"
  ;(map |(get $ :url) questions)] :p))

(rawterm/begin)
(print "In this quiz you will hear songs and have to guess their names hangman-style.")
(print "Please wait a bit for the playback to start.")
(print "If the program crashes, you may need to use pkill mpv and tput reset.")
(print "During the quiz, press ^C to exit.")
(prin "Press any key to continue: ")
(flush)
(rawterm/getch)
(def sock (net/connect :unix "/tmp/mpv-quiz.socket"))
(var points 0)
(var prevanswer "")
(each q questions
  (def {:url url :answer answer} q)
  (var wrong @"")
  (var correct @" '")
  (def testanswer (string/ascii-upper answer))
  (while (and (< (length wrong) (length man)) (not (string/check-set correct testanswer)))
    (prin "\x1b[2J\x1b[H")
    (printf "Previous answer: %s\n" prevanswer)
    (print man0)
    (print (string/join (slice man 0 (length wrong))))
    (prin "\n\n")
    (each char testanswer
      (cond
        (has-value? correct char) (prinf "%c" char)
        (= char 32) (prin " ")
        (= char 39) (prin "'")
        (prin "_"))
      (prin " "))
    (prin "\n\n")
    (prin "Guessed: ")
    (each char wrong (prinf "%c " char))
    (prin "\n\nEnter a character: ")
    (flush)
    (def char (get (string/ascii-upper (rawterm/getch)) 0))
    (when (= char 3)
      (rawterm/end)
      (os/proc-kill mpv)
      (os/exit))
    (when (and char
            (not= char 10)
            (not (has-value? correct char))
            (not (has-value? wrong char)))
      (if (has-value? testanswer char)
        (buffer/push correct char)
        (buffer/push wrong char))))
  (set (q :points) (- (length man) (length wrong)))
  (set prevanswer answer)
  (net/write sock "playlist-next force\nset pause no\n"))

(prin "\x1b[2J\x1b[H")
(printf "%-43s %-36s %-5s" "URL" "Answer" "Points")
(var total 0)
(each {:url url :answer answer :points points} questions
  (printf "%-43s %-36s %-5d" url answer points)
  (+= total points))

(printf "Total points: %d/%d. Goodbye." total (* (length questions) 7))
(rawterm/end)

(net/close sock)
(os/proc-wait mpv)

entry #6

written by ponydork
submitted at
1 like

guesses
comments 0

post a comment


theimpossiblequiz.wdz ASCII text
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
T: ____  _   _  ____
T:(_  _)( )_( )( ___)
T:  )(   ) _ (  )__)  ________ _____ _____ _____ ___________ _      _____
T: (__) (_) (_)(____)  || ___ \  _  /  ___/  ___|_   _| ___ \ |    |  ___|
T:          | | | .  . || |_/ / | | \ `--.\ `--.  | | | |_/ / |    | |__
T:          | | | |\/| ||  __/| | | |`--. \`--. \ | | | ___ \ |    |  __|
T:         _| |_| |  | || |   \ \_/ /\__/ /\__/ /_| |_  ____  |_  _|_|_______
T:         \___/\_|  |_/\_|    \___/\____/\____/ \___/ / __ \/ / / /  _/__  /
T:                                                    / / / / / / // /   / /
T:                                                   / /_/ / /_/ // /   / /__
T:                                                   \___\_\____/___/  /____/
T:
T: PRESS ANY KEY TO CONTINUE
A:
T: 1: HOW MANY HOLES IN A POLO?
T: ----------
T:| A ONE    |
T:| B TWO    |
T:| C THREE  |
T:| D FOUR   |
T: ----------
A:
M:D
NJ:1

T: 2: CAN A MATCH BOX?
T: -----------------------------
T:| A YES                       |
T:| B NO                        |
T:| C NO BUT A TIN CAN          |
T:| D YES ONE BEAT MIKE TYSON   |
T: -----------------------------
A:
M:C
NJ:1

T: 3: SDRAWKCAB NOITSEUQ SIHT REWSNA
T: -----------------------------
T:| A K.O                       |
T:| B WHAT?                     |
T:| C I DON'T UNDERSTAND        |
T:| D TENNIS ELBOW              |
T: -----------------------------
A:
M:A
NJ:1

T: 4: SQRT(ONION)
T: -----------
T:| A 28      |
T:| B CARROTS |
T:| C SHALLOWS|
T:| D PI      |
T: -----------
A:
M:C
NJ:1


T: 5: THE ANSWER IS REALLY BIG
T: -----------------
T:| A ANSWER        |
T:| B REALLY BIG    |
T:| C INFINITY      |
T:| D an elephant   |
T: -----------------
A:
M:D
NJ:1

T: 6: WHAT WAS THE ANSWER TO QUESTION 2?
T: -----------------
T:| A THAT ONE      |
T:| B THIS ONE      |
T:| C THIS ONE      |
T:| D THIS ONE      |
T: -----------------
A:
M:C
NJ:1

T: 7: WHAT FOLLOWS DECEMBER 2ND
T: -------------------
T:| A DECEMBER 3RD    |
T:| B ND              |
T:| C A QUESTION MARK |
T:| D 142 DRAWRVES    |
T: -------------------
A:
M:N
NJ:1

T: 8: WHAT SOUND DOES A BELL MAKE
T: -----------
T:| A WHOOP  |
T:| B F'TAANG|
T:| C FROON  |
T:| D BLIP-BLOP-BLOOP-BANGA-O-LANGA-WOOF,NUBBY-FRRPH120,000
T: -----------
A:
M:B
NJ:1


T: 9: WHAT CAN YOU PUT IN A BUCKET TO MAKE IT LIGHTER?
T: -------------------
T:| A GYPSIES         |
T:| B TORCH           |
T:| C A HOLE          |
T:| D CANNED LAUGHTER |
T: -------------------
A:
M:B
NJ:1

T:                   a@10@a
T:               a@@@@@@@@@@@@a
T:             a@@@@@@by@@@@@@@@a
T:           a@@@@@S@C@E@S@W@@@@@@a
T:           @@@@@@@@@@@@@@@@@@@@@@
T:            `@@@@@@`\\//'@@@@@@'
T:                 ,,  ||  ,, S.C.E.S.W.
T:                /(-\ || /.)m
T:           ,---' /`-'||`-'\ `----,
T:          /( )__))   ||   ((,==( )\\
T:       _ /_//___\\ __|| ___\\ __\\ ____
T:           ``    `` /MM\   ''   ''

A:
M:H
NJ:1
A:
M:O
NJ:1
A:
M:R
NJ:1
A:
M:S
NJ:1
A:
M:E
NJ:1

T: 11: WHAT IS THE 7TH LETTER OF THE ALPHABET
T: -----
T:| G A |
T:| I H |
T:| J I |
T:| K L |
T: -----
A:
M:I
NJ:1

T: 12: 10 - 5 = ?
T: ----------
T:| A 6      |
T:| B 2      |
T:| C WALRUS |
T:| D 16/931 |
T: ----------
A:
M:5
NJ:1

T: 13: BLUE ORANGE GREEN GREEN YELLOW
A:
M:B
NJ:1
A:
M:O
NJ:1
A:
M:G
NJ:1
A:
M:G
NJ:1
A:
M:Y
NJ:1

T: 14: DEAL OR NO DEAL?
T: ------------
T:| A DEAL!    |
T:| B NO DEAL! |
T:| C SEAL!    |
T:| D NO SEAL! |
T: ------------
A:
M:C
NJ:1


T: 15: THE CHOICE IS YOURS
T: ------------
T:| A +1 LIFE  |
T:| B -1 LIFE  |
T:| C ESCAPE!! |
T:| D ASCEND   |
T: ------------
A:
M:D
NJ:1

T: --------------------------------------------
T:| 16 | NOTEPAD                          |X|  |
T: --------------------------------------------
T:| DO YOU WANT TO SAVE CHANGES TO UNTITLED?   |
T:|                                            |
T:|                                            |
T:|                                            |
T:|                                  Y/N/C/B   |
T: --------------------------------------------
A:
M:B
NJ:1

T: 17: HOW DO YOU KILL A WEREWOLF
T: -----------------
T:| A SHOE POLISH   |
T:| B GRAVY GRANULES|
T:| C BLACK PUDDING |
T:| D CILLIT BANG   |
T: -----------------
A:
M:A
NJ:1

T: 18: WHICH OF THESE PLACE NAMES DOESN'T EXIST?
T:   .-------------------
T:  / /      A1337      |
T: / /                  |
T:/ /   B GERMANSWEEK   |
T:\ \   C BITCHFIELD    |
T: \ \  D FUCKTON       |
T:  \ \                 |
T:   .-------------------
T:       ||          ||
T:       ||          ||
T:       ||          ||
A:
M:D
NJ:1

T: I HOPE YOU'VE BEEN PAYING ATTENTION TO THE QUESTION NUMBERS
T: -----------------
T:| A GO TO 16      |
T:| B GO TO 15      |
T:| C GO TO 20      |
T:| D GOTO 19       |
T: -----------------
A:
M:C

T: 20: WHAT FLAVOUR IS CARDBOARD?
T: -------------------
T:| A HONEY           |
T:| B PORK SCRATCHINGS|
T:| C EGG MAYONNAISE  |
T:| D TALC            |
T: -------------------
A:
M:C

T: 21: I WANNA BE YOUR FUCKING
T: -------------------------------------------
T:| A THING THAT GETS ATTACHED TO YOU         |
T:| B DOG                                     |
T:| C PEBBLE THAT GETS STUCK INSIDE YOUR SHOE |
T:| D LAUNDRY                                 |
T: -------------------------------------------
A:
M:B


T: 22: CAN YOU GET THIS QUESTION WRONG?
T: -------------------------
T:| A NO                    |
T:| B NOPE                  |
T:| C NO WAY                |
T:| D OF COURSE NOT         |
T: -------------------------
A:

T: 23: WHAT ARE THE MAIN INGREDIENTS OF SHAMPOO?
T: ---------------------------
T:| A BLENDED CRICKETS        |
T:| B CATS AND WHELKS         |
T:| C POLAND                  |
T:| F GUILT AND WASTE         |
T: ---------------------------
A:
M:F

T: 24: WHAT DO YOU CALL A WINGLESS FLY?
T: ----------
T:| B A FLAP |
T:| A A WALK |
T:| C A PLUM |
T:| D JASON  |
T: ----------
A:
M:A

T: 25: MARY ROSE SAT ON A PIN.
T: -------------------
T:| A OH RLY?         |
T:| G MARY ROSE       |
T:| C BURST HER PILES |
T:| D AHAAHAHAHAHAHA! |
T: -------------------
A:
M:G


T: 26: WHAT DID YOU JUST WRITE OUT?
T: ----------
T:| A MYSELF |
T:| B MYSELF |
T:| C MYSELF |
T:| D MYSELF |
T: ----------
A:

YJ:2
*
T:                       ________________________________,
T: "===-----...__  __,-""  ]____[ _.----------,__________|
T: |             ""   /___________)||||||||||||(_(
T: |                ,-")) [Krogg98 '----------`
T: |  ___...--,_  ,`    ""
T: ""'          '`
T: YOU DIED
J:2
*
T:                                  ___________
T:                             .---'::'        `---.
T:                            (::::::'              )
T:                            |`-----._______.-----'|
T:                            |              :::::::|
T:                           .|               ::::::!-.
T:                           \|               :::::/|/
T:                            |               ::::::|
T:                            | Special Flonk Award:|
T:                            |    for Silliness::::|
T:                            |               ::::::|
T:                            |              .::::::|
T:                            J              :::::::F
T:                             \            :::::::/
T:                              `.        .:::::::'
T:                                `-._  .::::::-'
T:____________________________________|  ""'|"_________________________________________
T:                                    |  :::|
T:                                    F   ::J
T:                                   /     ::\
T:                              __.-'      :::`-.__
T:                             (_           ::::::_)
T:                               `""'---------""''
*

entry #7

written by Dolphy
submitted at
0 likes

guesses
comments 0

post a comment


bonus.py ASCII text
1
2
3
4
5
6
print("---- AM I GAY QUIZ ----")
yn = input("Are you gay? (Y/n): ")
if yn == 'y' or yn == 'Y':
    print("You are gay")
else:
    print("Don't lie to me, you are gay.")
data.txt ASCII text
1
2
3
4
5
6
7
# You shouldn't be looking here ;)
QUESTION "Which one is the best drink according to LyricLy?" ANSWERS "Coca-Cola" "Sprite" "Corona" "Dr. Pepper" CORRECT 4
QUESTION "Will LyricLy ever implement macron?" ANSWERS "Yes" "No" CORRECT 2
QUESTION "Which type of genre LyricLy hates the most?" ANSWERS "Sokoban" "RPG" "Platformer" "Sandbox" CORRECT 1
QUESTION "What is LyricLy's birthday?" ANSWERS "Oct 29th" "Oct 30th" "Nov 29th" "Nov 30th" CORRECT 4
QUESTION "Which game LyricLy plays the most?" ANSWERS "Minecraft" "Overwatch 2" "Town of Salem 2" "Terraria" CORRECT 3
QUESTION "As of now, when did LyricLy's oldest public video got uploaded to YouTube?" ANSWERS "Feb 12 2015" "March 12 2015" "Feb 12 2016" "March 12 2016" CORRECT 1
quiz.lua ASCII text
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
function skip_ws(line, i)
    while true do
        local c = line:sub(i, i)
        if c == ' ' or c == '\t' then
            i = i + 1
        else
            break
        end
    end
    return i
end

function expect(line, phrase, i, lineno)
    local start_i = i
    local phrase_len = #phrase
    for idx=1,phrase_len do
        local c1 = phrase:sub(idx, idx)
        local c2 = line:sub(i + idx - 1, i + idx - 1)

        if c1 ~= c2 then
            error("Expected \"" .. phrase .. "\" on ".. lineno .. ":" .. i)
        end
    end
    return i + phrase_len
end

function parse_quoted(line, i, lineno)
    i = expect(line, "\"", i, lineno)
    local content = ""
    local idx = 1
    while true do
        local c = line:sub(i + idx - 1, i + idx - 1)
        if c == "\"" then
            i = i + idx
            break
        elseif c == "\\" then
            local nextc = line:sub(i + idx, i + idx)
            local ch = ""
            if nextc == "\\" then
                ch = "\\"
            elseif nextc == "\"" then
                ch = "\""
            elseif nextc == "t" then
                ch = "\t"
            elseif nextc == "n" then
                ch = "\n"
            else
                error("Unknown escape sequence \"\\" .. nextc .. "\" on " .. (i + idx) .. ":" .. lineno)
            end

            content = content .. ch
            idx = idx + 1
        else
            content = content .. c
        end
        idx = idx + 1
    end
    return content, i
end

function parse_num(line, i)
    local final_num = ""
    while true do
        local c = line:sub(i, i)
        local b = string.byte(c)
        if not b then
            break
        end
        if b >= string.byte('0') and b <= string.byte('9') then
            final_num = final_num .. c
            i = i + 1
        else
            break
        end
    end
    return tonumber(final_num), i
end

function parse_ending(line, i, lineno)
    while true do
        local c = line:sub(i, i)
        if c == "\0" or c == nil or c == "#" or #c == 0 then
            break
        elseif c ~= " " and c ~= "\t" then
            error("Unexpected character '" .. c .. "' at " .. lineno .. ":" .. i)
        end
        i = i + 1
    end
    return i
end

function parse_line(line, lineno)
    local line_index = 1
    line_index = skip_ws(line, line_index)
    local first_char = line:sub(line_index, line_index)
    if first_char == '#' or #first_char == 0 then
        return nil
    end

    local question_body = ""
    local answers = {}
    local correct_idx = 0
    line_index = expect(line, "QUESTION", line_index, lineno)
    line_index = skip_ws(line, line_index)
    question_body, line_index = parse_quoted(line, line_index, lineno)
    line_index = skip_ws(line, line_index)
    line_index = expect(line, "ANSWERS", line_index, lineno)
    line_index = skip_ws(line, line_index)
    while true do
        local c = line:sub(line_index, line_index)
        if c ~= "\"" then
            break
        end

        local answer = ""
        answer, line_index = parse_quoted(line, line_index, lineno)
        table.insert(answers, answer)
        line_index = skip_ws(line, line_index)
    end
    line_index = expect(line, "CORRECT", line_index, lineno)
    line_index = skip_ws(line, line_index)
    correct_idx, line_index = parse_num(line, line_index)
    line_index = parse_ending(line, line_index, lineno)

    return {
        question = question_body,
        answers = answers,
        correct_idx = correct_idx
    }
end

function read_file(filename)
    local file = io.open(filename, "r")
    if not file then
        error("Unable to load file")
    end

    local quiz_list = {}
    local lineno = 1
    for line in file:lines() do
        local quiz = parse_line(line, lineno)
        if not quiz then
            goto continue
        end
        table.insert(quiz_list, quiz)
        lineno = lineno + 1
        ::continue::
    end

    file:close()
    return quiz_list
end

print("LyricLy quiz")
print()

local quiz_list = read_file("data.txt")
local total = #quiz_list
local correct = 0
local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i,quiz in ipairs(quiz_list) do
    print(quiz.question)
    for j,answer in ipairs(quiz.answers) do
        print(alphabet:sub(j,j) .. ") " .. answer)
    end
    ::take_input::
    io.write("> ")
    local ans = io.read("*l"):upper()
    if #ans ~=1 or not (string.byte(ans) >= string.byte("A") and string.byte(ans) <= string.byte("Z")) then
        print("Invalid input!")
        goto take_input
    end

    local idx = string.byte(ans) - string.byte('A') + 1
    if idx == quiz.correct_idx then
        correct = correct + 1
    end
end

print("Quiz is over, you got " .. correct .. " out of " .. total .. " correct.")