source: flexograder/examples/python/new.json@ 20b84df

fake-data main
Last change on this file since 20b84df was 20b84df, checked in by Enrico Schwass <ennoausberlin@…>, 4 months ago

convert example catalog to new format

Signed-off-by: Enrico Schwass <ennoausberlin@…>

  • Property mode set to 100644
File size: 9.3 KB
Line 
1{
2 "flexo_id": "PY_BEGINNER-C251122-1A2B3C4D5E6F@001D",
3 "title": "Python Absolute Beginner Questions",
4 "author": "Python Team",
5 "version": "1.0",
6 "generated_at": "2025-11-22",
7
8 "domains": {
9 "PY_BEGINNER": {
10 "domain_id": "PY_BEGINNER",
11 "name": "Python Beginner Essentials",
12 "description": "Einsteigerfragen zu Python: Grundlagen, Datentypen, Dateien, Schleifen, Kontrollstrukturen."
13 }
14 },
15
16 "questions": [
17 {
18 "flexo_id": "PY_BEGINNER-I251122-9C2FA6D10E93@001D",
19 "domain_id": "PY_BEGINNER",
20 "qtype": "single_choice",
21 "text": "Welcher Operator führt die Ganzzahl-Division aus (abrunden Richtung −∞)?",
22 "options": [
23 {"id": "A", "text": "//", "points": 1},
24 {"id": "B", "text": "/", "points": 0},
25 {"id": "C", "text": "%", "points": 0}
26 ]
27 },
28
29 {
30 "flexo_id": "PY_BEGINNER-I251122-041CBAB1D8EF@001D",
31 "domain_id": "PY_BEGINNER",
32 "qtype": "multiple_choice",
33 "text": "Welche Aussagen zu int und float sind richtig?",
34 "options": [
35 {"id": "A", "text": "int ist in der Größe nur durch den Speicher begrenzt.", "points": 1},
36 {"id": "B", "text": "0.1 + 0.2 kann wegen Binär-Floats leicht von 0.3 abweichen.", "points": 1},
37 {"id": "C", "text": "int hat immer exakt 64 Bit in Python.", "points": 0},
38 {"id": "D", "text": "math.isclose hilft beim Vergleichen von Floats.", "points": 1}
39 ]
40 },
41
42 {
43 "flexo_id": "PY_BEGINNER-I251122-682F4D78BB02@001D",
44 "domain_id": "PY_BEGINNER",
45 "qtype": "single_choice",
46 "text": "Welches Ergebnis hat 2 ** 3 ** 2 in Python?",
47 "options": [
48 {"id": "A", "text": "512 (rechtsassoziativ)", "points": 1},
49 {"id": "B", "text": "64", "points": 0},
50 {"id": "C", "text": "Fehler", "points": 0}
51 ]
52 },
53
54 {
55 "flexo_id": "PY_BEGINNER-I251122-59E4F519207C@001D",
56 "domain_id": "PY_BEGINNER",
57 "qtype": "multiple_choice",
58 "text": "Welche Funktionen wandeln Zahlen oder runden sinnvoll?",
59 "options": [
60 {"id": "A", "text": "int('42')", "points": 1},
61 {"id": "B", "text": "float('3.14')", "points": 1},
62 {"id": "C", "text": "round(3.5)", "points": 1},
63 {"id": "D", "text": "toint(3.2)", "points": 0}
64 ]
65 },
66
67 {
68 "flexo_id": "PY_BEGINNER-I251122-7DA6E91C299B@001D",
69 "domain_id": "PY_BEGINNER",
70 "qtype": "single_choice",
71 "text": "Welches Paar gibt Quotient und Rest gemeinsam zurück?",
72 "options": [
73 {"id": "A", "text": "divmod(a, b)", "points": 1},
74 {"id": "B", "text": "split(a, b)", "points": 0},
75 {"id": "C", "text": "quot(a, b)", "points": 0}
76 ]
77 },
78
79 {
80 "flexo_id": "PY_BEGINNER-I251122-19A961778C0E@001D",
81 "domain_id": "PY_BEGINNER",
82 "qtype": "single_choice",
83 "text": "Welche Schleife wiederholt Code, solange eine Bedingung wahr ist?",
84 "options": [
85 {"id": "A", "text": "while", "points": 1},
86 {"id": "B", "text": "if", "points": 0},
87 {"id": "C", "text": "match/case", "points": 0}
88 ]
89 },
90
91 {
92 "flexo_id": "PY_BEGINNER-I251122-9565317037EF@001D",
93 "domain_id": "PY_BEGINNER",
94 "qtype": "multiple_choice",
95 "text": "Welche Schlüsselwörter passen zu Schleifen?",
96 "options": [
97 {"id": "A", "text": "break beendet die Schleife vorzeitig.", "points": 1},
98 {"id": "B", "text": "continue springt zur nächsten Iteration.", "points": 1},
99 {"id": "C", "text": "redo startet die Schleife neu.", "points": 0},
100 {"id": "D", "text": "else-Teil läuft, wenn kein break passierte.", "points": 1}
101 ]
102 },
103
104 {
105 "flexo_id": "PY_BEGINNER-I251122-F16429E8C6A1@001D",
106 "domain_id": "PY_BEGINNER",
107 "qtype": "single_choice",
108 "text": "Wie iteriert man idiomatisch über Index UND Wert?",
109 "options": [
110 {"id": "A", "text": "for i, x in enumerate(seq):", "points": 1},
111 {"id": "B", "text": "for i in range(seq): x = seq[i]", "points": 0},
112 {"id": "C", "text": "for (i, x) in seq.items()", "points": 0}
113 ]
114 },
115
116 {
117 "flexo_id": "PY_BEGINNER-I251122-76743FD15104@001D",
118 "domain_id": "PY_BEGINNER",
119 "qtype": "multiple_choice",
120 "text": "Welche gehören zur if-Syntax?",
121 "options": [
122 {"id": "A", "text": "if …:", "points": 1},
123 {"id": "B", "text": "elif …:", "points": 1},
124 {"id": "C", "text": "elseif …:", "points": 0},
125 {"id": "D", "text": "else:", "points": 1}
126 ]
127 },
128
129 {
130 "flexo_id": "PY_BEGINNER-I251122-3DFA621A61F7@001D",
131 "domain_id": "PY_BEGINNER",
132 "qtype": "single_choice",
133 "text": "Wofür steht der Walrus-Operator (:=) auf Einsteiger-Niveau?",
134 "options": [
135 {"id": "A", "text": "Zuweisung in einem Ausdruck, z. B. while (s := input()) != ''", "points": 1},
136 {"id": "B", "text": "Vergleichsoperator", "points": 0},
137 {"id": "C", "text": "Importoperator", "points": 0}
138 ]
139 },
140
141 { "flexo_id": "PY_BEGINNER-I251122-660F17B704AC@001D",
142 "domain_id": "PY_BEGINNER",
143 "qtype": "single_choice",
144 "text": "Wie öffnet man eine Textdatei sicher zum Lesen in UTF-8?",
145 "options": [
146 {"id": "A", "text": "open(path, 'r', encoding='utf-8')", "points": 1},
147 {"id": "B", "text": "open(path)", "points": 0},
148 {"id": "C", "text": "open('utf-8', path)", "points": 0}
149 ]
150 },
151
152 { "flexo_id": "PY_BEGINNER-I251122-1EE87A1F35B1@001D",
153 "domain_id": "PY_BEGINNER",
154 "qtype": "multiple_choice",
155 "text": "Warum with beim Datei-I/O nutzen?",
156 "options": [
157 {"id": "A", "text": "Datei wird automatisch geschlossen.", "points": 1},
158 {"id": "B", "text": "Weniger Risiko für Leaks/Fehler.", "points": 1},
159 {"id": "C", "text": "Code wird automatisch schneller.", "points": 0},
160 {"id": "D", "text": "Kompaktere Schreibweise.", "points": 1}
161 ]
162 },
163
164 { "flexo_id": "PY_BEGINNER-I251122-56FD1E83422E@001D",
165 "domain_id": "PY_BEGINNER",
166 "qtype": "single_choice",
167 "text": "Welcher Modus hängt Text an (ohne zu überschreiben)?",
168 "options": [
169 {"id": "A", "text": "'a'", "points": 1},
170 {"id": "B", "text": "'w'", "points": 0},
171 {"id": "C", "text": "'x'", "points": 0}
172 ]
173 },
174
175 { "flexo_id": "PY_BEGINNER-I251122-9233B52C30D3@001D",
176 "domain_id": "PY_BEGINNER",
177 "qtype": "multiple_choice",
178 "text": "Welche Pfad-Utilities aus der Stdlib sind nützlich?",
179 "options": [
180 {"id": "A", "text": "pathlib.Path", "points": 1},
181 {"id": "B", "text": "os.path", "points": 1},
182 {"id": "C", "text": "glob", "points": 1},
183 {"id": "D", "text": "sys.path zum Schreiben von Dateien", "points": 0}
184 ]
185 },
186
187 { "flexo_id": "PY_BEGINNER-I251122-1D819850078F@001D",
188 "domain_id": "PY_BEGINNER",
189 "qtype": "single_choice",
190 "text": "Wie liest man große Textdateien speicherschonend?",
191 "options": [
192 {"id": "A", "text": "for line in f:", "points": 1},
193 {"id": "B", "text": "text = f.read()", "points": 0},
194 {"id": "C", "text": "lines = f.readlines()", "points": 0}
195 ]
196 },
197
198 { "flexo_id": "PY_BEGINNER-I251122-C6D7F5428D92@001D",
199 "domain_id": "PY_BEGINNER",
200 "qtype": "single_choice",
201 "text": "Wozu dienen Typannotationen in Python?",
202 "options": [
203 {"id": "A", "text": "Für Tools/IDE/Typchecker; Laufzeit bleibt dynamisch.", "points": 1},
204 {"id": "B", "text": "Erzwingen strikt die Typen zur Laufzeit.", "points": 0},
205 {"id": "C", "text": "Ersetzen Docstrings vollständig.", "points": 0}
206 ]
207 },
208
209 { "flexo_id": "PY_BEGINNER-I251122-21BF1EB15CC4@001D",
210 "domain_id": "PY_BEGINNER",
211 "qtype": "multiple_choice",
212 "text": "Welche sind gültige Container-Annotationen (>=3.9)?",
213 "options": [
214 {"id": "A", "text": "list[int]", "points": 1},
215 {"id": "B", "text": "dict[str, int]", "points": 1},
216 {"id": "C", "text": "set[float]", "points": 1},
217 {"id": "D", "text": "tuple<int>", "points": 0}
218 ]
219 },
220
221 { "flexo_id": "PY_BEGINNER-I251122-1798CB33B11A@001D",
222 "domain_id": "PY_BEGINNER",
223 "qtype": "single_choice",
224 "text": "Wie annotiert man 'oder None' präzise?",
225 "options": [
226 {"id": "A", "text": "T | None (Optional[T])", "points": 1},
227 {"id": "B", "text": "Any", "points": 0},
228 {"id": "C", "text": "object", "points": 0}
229 ]
230 },
231
232 { "flexo_id": "PY_BEGINNER-I251122-071E3FA28B05@001D",
233 "domain_id": "PY_BEGINNER",
234 "qtype": "multiple_choice",
235 "text": "Welche Stdlib-Hilfen definieren einfache Datenobjekte?",
236 "options": [
237 {"id": "A", "text": "dataclasses.dataclass", "points": 1},
238 {"id": "B", "text": "collections.namedtuple", "points": 1},
239 {"id": "C", "text": "typing.TypedDict", "points": 1},
240 {"id": "D", "text": "functools.singledispatch", "points": 0}
241 ]
242 }
243 ]
244 }
Note: See TracBrowser for help on using the repository browser.