1
+ import {
2
+ AnswerChoice ,
3
+ MultipleChoiceQuizQuestion ,
4
+ QuizQuestion ,
5
+ QuizQuestionProvider ,
6
+ } from 'codedifferently-instructional' ;
7
+
8
+ export class ChigazoGrahamsQuiz implements QuizQuestionProvider {
9
+ getProviderName ( ) : string {
10
+ return 'chigazograham' ;
11
+ }
12
+
13
+ makeQuizQuestions ( ) : QuizQuestion [ ] {
14
+ return [ ChigazoGrahamsQuiz . makeQuestion1 ( ) , ChigazoGrahamsQuiz . makeQuestion2 , ChigazoGrahamsQuiz . makeQuestion3 ( ) ] ;
15
+ }
16
+
17
+ private static makeQuestion1 ( ) : QuizQuestion {
18
+ return new MultipleChoiceQuizQuestion (
19
+ 1 ,
20
+ 'What is the sign for Modulo?' ,
21
+ new Map < AnswerChoice , string > ( [
22
+ [ AnswerChoice . A , '^' ] ,
23
+ [ AnswerChoice . B , '*' ] ,
24
+ [ AnswerChoice . C , '%' , ] ,
25
+ [ AnswerChoice . D , '//' ] ,
26
+ ] ) ,
27
+ AnswerChoice . UNANSWERED ,
28
+ ) ; // Provide an answer. | AnswerChoice.C, '%'
29
+ }
30
+
31
+ private static makeQuestion2 ( ) : QuizQuestion {
32
+ return new QuizQuestion (
33
+ 2 ,
34
+ 'Who is are big three in hip hop?' ,
35
+ 'A machine that automatically transforms input into output.' ,
36
+ new Map < AnswerChoice , string > ( [
37
+ [ AnswerChoice . A , 'Kendrick Lamar, J. Cole, and Drake' ] ,
38
+ [ AnswerChoice . B , 'Tupac, Biggie, and Nas' ] ,
39
+ [ AnswerChoice . C , 'Kanye West, Eminem, and Lil Wayne' , ] ,
40
+ [ AnswerChoice . D , 'K. Dot' ] ,
41
+ ] ) ,
42
+ AnswerChoice . UNANSWERED ,
43
+ ) ; // Provide an answer. | AnswerChoice.D, 'K. Dot'
44
+ }
45
+
46
+ private static makeQuestion3 ( ) : QuizQuestion {
47
+ return new MultipleChoiceQuizQuestion (
48
+ 3 ,
49
+ 'what is the answer to life, the universe, and everything else?' ,
50
+ new Map < AnswerChoice , string > ( [
51
+ [ AnswerChoice . A , '42' ] ,
52
+ [ AnswerChoice . B , 'Jesus' ] ,
53
+ [ AnswerChoice . C , 'N/A' ] ,
54
+ [ AnswerChoice . D , 'Whatever you want it to be!' ] ,
55
+ ] ) ,
56
+ AnswerChoice . UNANSWERED ,
57
+ ) ; // Provide an answer. | AnswerChoice.A, '42'
58
+ }
59
+
60
+ }
0 commit comments