-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContent.kt
99 lines (77 loc) · 3.28 KB
/
Content.kt
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
import com.github.pambrose.common.util.FileSystemSource
import com.github.pambrose.common.util.GitHubRepo
import com.github.pambrose.common.util.OwnerType.Organization
import com.github.readingbat.dsl.ReturnType.*
import com.github.readingbat.dsl.isProduction
import com.github.readingbat.dsl.readingBatContent
val content =
readingBatContent {
repo =
if (isProduction())
GitHubRepo(Organization, "readingbat", "readingbat-python-content")
else
FileSystemSource("./")
python {
group("Boolean Expressions") {
packageName = "boolean_exprs"
description = "Basic boolean expressions"
challenge("less_than") { returnType = BooleanType }
challenge("greater_than") { returnType = BooleanType }
challenge("less_than_or_equal") { returnType = BooleanType }
challenge("greater_than_or_equal") { returnType = BooleanType }
challenge("equal") { returnType = BooleanType }
challenge("not_equal") { returnType = BooleanType }
challenge("modulo1") { returnType = IntType }
challenge("modulo2") { returnType = BooleanType }
challenge("modulo3") { returnType = BooleanType }
includeFilesWithType = "andor*.py" returns BooleanType
}
group("String Operations") {
packageName = "string_ops"
description = "Basic string operations"
challenge("goodbye_name") { returnType = StringType }
challenge("combine1") { returnType = StringType }
challenge("combine2") { returnType = StringType }
includeFilesWithType = "concat*.py" returns StringType
includeFilesWithType = "strlen*.py" returns IntType
challenge("in_oper") { returnType = BooleanType }
challenge("starts_with") { returnType = BooleanType }
challenge("ends_with") { returnType = BooleanType }
includeFilesWithType = "slice*.py" returns StringType
challenge("split") { returnType = StringType }
}
group("If Statements") {
packageName = "if_stmts"
description = "Basic if statements"
includeFilesWithType = "if_stmt*.py" returns IntType
}
group("For Loops") {
packageName = "for_loops"
description = "Basic for loops"
includeFilesWithType = "for_loop*.py" returns IntType
}
group("Lists") {
packageName = "lists"
description = "Basic list challenges"
includeFilesWithType = "list*.py" returns IntType
}
group("Warmup 1") {
packageName = "warmup1"
description = "Warmup 1 challenges"
challenge("simple_choice1") { returnType = BooleanType }
challenge("simple_choice2") {
codingBatEquiv = "p173401"
returnType = BooleanType
}
challenge("boolean_list") { returnType = BooleanListType }
challenge("int_list") { returnType = IntListType }
challenge("string_list") { returnType = StringListType }
challenge("x_and_y") { returnType = IntType }
challenge("replace1") { returnType = StringType }
challenge("replace2") { returnType = StringType }
challenge("replace3") { returnType = StringType }
challenge("replace4") { returnType = StringType }
challenge("count1") { returnType = IntType }
}
}
}