-
Notifications
You must be signed in to change notification settings - Fork 0
/
syntax-error.json
88 lines (88 loc) · 4.5 KB
/
syntax-error.json
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
[
"\n{'code': 'a, b, temp = b, a, a'}",
"\n{'code': 'a, b = b, a'}",
"\n{'code': 'temp = a', 'import': ['numpy']}",
"\n{'code': 'a, b = b, a, a', 'import': ['numpy']}",
"\n{'code': 'import numpy as np\\ncount = np.sum(arr)', 'type': 'advanced'}",
"\n{'code': 'count = 0\\nfor (index, value) in enumerate(arr):\\n count += arr[index]', 'type': 'intermediate'}",
"\n{'code': 'b, a, temp = b, a, b', 'type': 'beginner'}",
"\n{'code': 'b = b - 1\\na = a + 1\\ntemp = b', 'type': 'advanced'}",
"\n{'code': 'b = b - 1\\na = a + 1\\ntemp = b + a', 'type': 'intermediate'}",
"\n{'code': 'b = b - 1\\na = a + 1\\ntemp = b + a + 1', 'type': 'beginner'}",
"\n{'code': 'temp = a;\\n a = b;\\n b = temp;'}",
"\n{'code': '\\na, b, temp = b, b, a\\n\\nprint(a, b, temp)'}",
"\n{'code': 'temp = a\\na = b\\nb = temp'}",
"\n{'code': 'b, a, temp = a, a, b'}",
"\n{'code': 'a, b, temp = b, b, a'}",
"\n{'code': 'temp = a\\ntemp = b\\na = b\\nb = temp'}",
"\n{'code': 'a, b = b, a\\nprint(a, b)'}",
"\n{'code': 'a, b = b, a\\nprint(f\"a={a}, b={b}\")'}",
"\n{'code': '\\nimport numpy as np\\na, b = b, a\\nnp.array([a, b])\\n'}",
"\n{'code': 'b, a = b, a'}",
"\n{'code': 'a, b = (b, a) if a > b else (a, b)'}",
"\n{'code': 'a, b = b, a if a > b else (a, b)'}",
"\n{'code': 'a, b = b, a if a < b else (a, b)'}",
"\n{'code': 'a, b = b, a if a >= b else (a, b)'}",
"\n{'code': 'a, b = b, a if a <= b else (a, b)'}",
"\n{'code': 'a = b; b = a; a = temp'}",
"\n{'code': 'temp = a; a = b; b = temp'}",
"\n{'code': 'b, a = a, b'}",
"\n{'code': 'temp, a, b = b, a, temp'}",
"\n{'code': 'temp = a; a, b = b, temp'}",
"\n{'code': 'a, temp = b, a; b = temp'}",
"\n{'code': 'temp, a = a, b; b = temp'}",
"\n{'code': 'temp = a\\ntemp, a, b = a, b, temp'}",
"\n{'code': 'temp = a\\ntemp, a = a, b\\nb = temp'}",
"\n{'code': 'temp = a\\ntemp, b = a, b\\na = temp'}",
"\n{'code': 'temp = a\\nb = a\\na = temp'}",
"\n{'code': 'temp = b\\na, b = a, temp'}",
"\n{'code': 'temp = b\\ntemp, a = a, b\\nb = temp'}",
"\n{'code': 'temp = b\\ntemp, b = a, b\\na = temp'}",
"\n{'code': 'temp = b\\nb = a\\na = temp'}",
"\n{'code': 'a, b, temp = temp, a, b'}",
"\n{'code': 'a, b = b, b'}",
"\n{'code': 'temp = b\\na, b = b, temp'}",
"\n{'code': 'b, a, temp = b, a, b'}",
"\n{'code': 'a, b = temp, a'}",
"\n{'code': 'a, b = a, b'}",
"\n{'code': 'a, b = temp, b'}",
"\n{'code': 'a, b = b, temp'}",
"\n{'code': 'a, b = a, temp'}",
"\n{'code': 'temp = b\\ntemp = a\\na = temp'}",
"\n{'code': 'temp = b\\ntemp = a\\na = b\\nb = temp'}",
"\n{'code': 'b, a, temp = a, b, a'}",
"\n{'code': 'a, b = b, a; b, a = a, b'}",
"\n{'code': 'a, b, temp = a, b, a; b, a = b, a'}",
"\n{'code': 'b, a, temp = a, b, a; a, b = a, b'}",
"\n{'code': 'b, a, temp = a, b, a; b, a = a, b; a, b = b, a'}",
"\n{'code': 'b, a, temp = a, b, a; b, a = a, b; a, b = b, a; b, a = a, b'}",
"\n{'code': 'temp = a; b = a; a = temp'}",
"\n{'code': 'temp, a, b = a, b, a'}",
"\n{'code': 'b, temp = a, a\\na = temp'}",
"\n{'code': 'temp, b = b, a\\na = temp'}",
"\n{'code': 'b, a = a, b\\na = b'}",
"\n{'code': 'temp = a\\na, b = b, temp'}",
"\n{'code': 'a, b = a, b\\ntemp = a'}",
"\n{'code': 'a, b = b, a\\ntemp = b'}",
"\n{'code': 'temp = a\\na, b = a, b\\na = temp'}",
"\n{'code': 'temp = b\\na, b = a, b\\na = temp'}",
"\n{'code': 'temp = a\\na, b = b, b\\na = temp'}",
"\n{'code': 'temp = b\\na, b = b, a\\na = temp'}",
"\n{'code': 'a, b, temp = b, a, a\\ntemp = b'}",
"\n{'code': 'a, b, temp = b, a, a\\ntemp = a'}",
"\n{'code': 'temp = b\\n b = a\\n a = temp'}",
"\n{'code': 'a, b = b, a\\ntemp = a\\n a = b\\n b = temp'}",
"\n{'code': 'a, b = b, a\\ntemp = b\\n b = a\\n a = temp\\ntemp = b'}",
"\n{'code': 'a, b = b, a\\ntemp = b\\n b = a\\n a = temp\\ntemp = b\\nb = a\\na = temp'}",
"\n{'code': 'a, b = b, a\\ntemp = b\\n b = a\\n a = temp\\ntemp = b\\nb = a\\na = temp\\nb = temp'}",
"\n{'code': '\\ndef swap(a, b):\\n temp = a\\n a = b\\n b = temp\\n\\nswap(a, b)\\n'}",
"\n{'code': '\\na, b = (b, a)\\n'}",
"\n{'code': '\\ntemp = a\\na = b\\nb = temp\\n\\nprint(a, b)\\n'}",
"\n{'code': '\\na = 2\\nb = 3\\ntemp = a ^ b\\nb ^= a\\na ^= temp\\n', 'type': 'beginner'}",
"\n{'code': '\\na = 2\\nb = 3\\nc = a ^ b\\nb ^= a\\na ^= c\\n', 'type': 'intermediate'}",
"\n{'code': '\\na = 2\\nb = 3\\n\\na ^= b\\na ^= b\\n', 'type': 'expert'}",
"\n{'code': 'import copy\\na, b = copy.copy(b), copy.copy(a)'}",
"\n{'code': 'b += a', 'comment': 'beginner code'}",
"\n{'code': 'b = b + a', 'comment': 'intermediate code'}",
"\n{'code': 'temp = b\\nb += a\\nb = temp', 'comment': 'expert code'}"
]