You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: '{{ replace .File.ContentBaseName `-` ` ` | title }}'
3
-
pass_percentage: 70# Minimum percentage required to pass the test
4
-
time_limit: 15# Duration of the test in minutes
3
+
passPercentage: 70# Minimum percentage required to pass the test
4
+
timeLimit: 15# Duration of the test in minutes
5
5
level: "beginner"# Difficulty level of the test
6
6
category: "Programming Languages"# Category of the test
7
7
tags: ["golang", "basics", "syntax", "fundamentals"] # Tags for the test, useful for search and categorization
8
8
type: "test"# Type of the content, in this case, a test ( required for the test to be recognized by the system )
9
9
final: true # Indicates that this test is the final exam and must be completed to complete the course , module or section
10
10
11
11
questions:
12
+
# IDs can stay short slugs in front matter; academy-theme derives stable UUIDs in emitted quiz JSON.
12
13
# Multiple Choice Question (Single Answer)
13
14
# NOTE: The 'marks' field must be a positive number (greater than 0). Negative or zero values will cause a build error.
14
15
- id: "q1"
15
16
text: "What keyword is used to define a function in Go?"
16
-
type: "multiple_answers"
17
+
type: "single-answer"
17
18
marks: 2
18
19
explanation: "The 'func' keyword is used to declare functions in Go, similar to how 'function' is used in JavaScript."
19
20
options:
20
21
- id: "a"
21
22
text: "function"
22
-
is_correct: false
23
+
isCorrect: false
23
24
- id: "b"
24
25
text: "def"
25
-
is_correct: false
26
+
isCorrect: false
26
27
- id: "c"
27
28
text: "func"
28
-
is_correct: true
29
+
isCorrect: true
29
30
- id: "d"
30
31
text: "fn"
31
-
is_correct: false
32
+
isCorrect: false
32
33
33
34
# Short Answer Question
34
35
- id: "q2"
35
36
text: "Go is a statically typed language. (true/false)"
36
-
type: "short_answer"
37
+
type: "short-answer"
37
38
marks: 2
38
-
correct_answer: "true"
39
+
correctAnswer: "true"
39
40
case_sensitive: false
40
41
explanation: "Go is indeed a statically typed language, meaning variable types are determined at compile time."
41
42
42
43
# Short Answer Question (Numeric)
43
44
- id: "q3"
44
45
text: "What is the zero value of an uninitialized int in Go?"
45
-
type: "short_answer"
46
+
type: "short-answer"
46
47
marks: 2
47
-
correct_answer: "0"
48
+
correctAnswer: "0"
48
49
explanation: "In Go, the zero value for numeric types like int is 0."
49
50
50
51
# Multiple Choice Question (Multiple Answers)
51
52
- id: "q4"
52
53
text: "What are the purposes of the 'defer' keyword in Go? (Select all that apply)"
53
-
type: "multiple_answers"
54
+
type: "multiple-answers"
54
55
marks: 2
55
56
explanation: "The defer keyword is commonly used to delay function execution until the surrounding function returns, often used for cleanup tasks like closing files."
56
57
options:
57
58
- id: "a"
58
59
text: "To delay the execution of a function until the surrounding function returns"
59
-
is_correct: true
60
+
isCorrect: true
60
61
- id: "b"
61
62
text: "To define a constant value"
62
-
is_correct: false
63
+
isCorrect: false
63
64
- id: "c"
64
65
text: "To close resources like files or network connections"
title: '{{ replace .File.ContentBaseName `-` ` ` | title }}'
3
-
pass_percentage: 70# Minimum percentage required to pass the test
4
-
time_limit: 15# Duration of the test in minutes
3
+
passPercentage: 70# Minimum percentage required to pass the test
4
+
timeLimit: 15# Duration of the test in minutes
5
5
level: "beginner"# Difficulty level of the test
6
6
category: "Programming Languages"# Category of the test
7
7
tags: ["golang", "basics", "syntax", "fundamentals"] # Tags for the test, useful for search and categorization
8
8
type: "test"# Type of the content, in this case, a test ( required for the test to be recognized by the system )
9
9
is_optional: true # Indicates that this test is optional and does not need to be completed to take the final exam
10
10
11
11
questions:
12
+
# IDs can stay short slugs in front matter; academy-theme derives stable UUIDs in emitted quiz JSON.
12
13
# Multiple Choice Question (Single Answer)
13
14
# NOTE: The 'marks' field must be a positive number (greater than 0). Negative or zero values will cause a build error.
14
15
- id: "q1"
15
16
text: "What keyword is used to define a function in Go?"
16
-
type: "multiple_answers"
17
+
type: "single-answer"
17
18
marks: 2
18
19
explanation: "The 'func' keyword is used to declare functions in Go, similar to how 'function' is used in JavaScript."
19
20
options:
20
21
- id: "a"
21
22
text: "function"
22
-
is_correct: false
23
+
isCorrect: false
23
24
- id: "b"
24
25
text: "def"
25
-
is_correct: false
26
+
isCorrect: false
26
27
- id: "c"
27
28
text: "func"
28
-
is_correct: true
29
+
isCorrect: true
29
30
- id: "d"
30
31
text: "fn"
31
-
is_correct: false
32
+
isCorrect: false
32
33
33
34
# Short Answer Question
34
35
- id: "q2"
35
36
text: "Go is a statically typed language. (true/false)"
36
-
type: "short_answer"
37
+
type: "short-answer"
37
38
marks: 2
38
-
correct_answer: "true"
39
+
correctAnswer: "true"
39
40
case_sensitive: false
40
41
explanation: "Go is indeed a statically typed language, meaning variable types are determined at compile time."
41
42
42
43
# Short Answer Question (Numeric)
43
44
- id: "q3"
44
45
text: "What is the zero value of an uninitialized int in Go?"
45
-
type: "short_answer"
46
+
type: "short-answer"
46
47
marks: 2
47
-
correct_answer: "0"
48
+
correctAnswer: "0"
48
49
explanation: "In Go, the zero value for numeric types like int is 0."
49
50
50
51
# Multiple Choice Question (Multiple Answers)
51
52
- id: "q4"
52
53
text: "What are the purposes of the 'defer' keyword in Go? (Select all that apply)"
53
-
type: "multiple_answers"
54
+
type: "multiple-answers"
54
55
marks: 2
55
56
explanation: "The defer keyword is commonly used to delay function execution until the surrounding function returns, often used for cleanup tasks like closing files."
56
57
options:
57
58
- id: "a"
58
59
text: "To delay the execution of a function until the surrounding function returns"
59
-
is_correct: true
60
+
isCorrect: true
60
61
- id: "b"
61
62
text: "To define a constant value"
62
-
is_correct: false
63
+
isCorrect: false
63
64
- id: "c"
64
65
text: "To close resources like files or network connections"
0 commit comments