forked from web-cat/code-workout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_exercise.yaml
94 lines (92 loc) · 2.47 KB
/
example_exercise.yaml
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
---
- external_id: if-else-mcq
is_public: false
experience: 50
language_list: Java
style_list: multiple choice, single answer
tag_list: conditional
current_version:
version: 1
creator: [email protected]
prompts:
- multiple_choice_prompt:
position: 1
question: |
Which of the following is the correct way to set up an if/else statement in Java?
allow_multiple: false
choices:
- answer: |
~~~
if (condition) {
//do something
} else {
//do something else
}
~~~
position: 1
value: 1
- answer: |
~~~
if condition {
//do something
} else {
//do something else
}
~~~
position: 2
value: 0
- answer: |
~~~
if condition than{
//do something
} else {
//do something else
}
~~~
position: 3
value: 0
- answer: A or B.
position: 4
value: 0
- answer: None of the above.
position: 4
value: 0
- external_id: gotoClass
is_public: false
experience: 50
language_list: Java
style_list: code writing
tag_list: conditional
current_version:
version: 1
creator: [email protected]
prompts:
- coding_prompt:
position: 1
question: |
Write a function that takes in month of the year as an integer (Jan=1, Dec=12) and outputs the string "summer break!" if the month is May-July or "go to class!" for any other month. If any other number is input, output the string "invalid month".
class_name: Month
method_name: monthChecker
starter_code: |
public int monthChecker(int month)
{
___
}
wrapper_code: |
public class Month
{
___
public static class Math {}
public static class java
{
public static class lang
{
public static class Math {}
}
}
}
tests: |
"1","go to class!",example
"6","summer break!",example
"13","invalid month"
"-1","invalid month",hidden