File tree Expand file tree Collapse file tree 6 files changed +18
-141
lines changed
Expand file tree Collapse file tree 6 files changed +18
-141
lines changed Original file line number Diff line number Diff line change 3333
3434"a" if False else "b"
3535#expect:"b"
36+
37+ 700 + 1 if True else "b"
38+ #EXPECT:701
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,15 +29,6 @@ False and True
2929
3030##################################
3131
32- not True
33- #expect:False
34-
35- not False
36- #expect:True
37-
38- not (True and False)
39- #expect:True
40-
4132"hello" and "world" + 4
4233#EXPECT:"world4"
4334
@@ -47,5 +38,3 @@ not (True and False)
4738"hello" and "world" or "kaputt" and + 4
4839#EXPECT:"world"
4940
50- 700 + 1 if True else "b"
51- #EXPECT:701
Original file line number Diff line number Diff line change 1+
2+ not True
3+ #expect:False
4+
5+ not False
6+ #expect:True
7+
8+ not (True and False)
9+ #expect:True
10+
111not (False or True)
212#expect:False
Original file line number Diff line number Diff line change 1- 5 + 3
2- #expect:8
3-
4- "a" + "b"
5- #expect:"ab"
6-
7- 1 + "b"
8- #expect:"1b"
9-
10- 1 + 2 + 3 + 4
11- #expect:10
12-
13- 5 + 0
14- #expect:5
15-
16- 0 + 0
17- #expect:0
18-
19- ##################################
201
2125 - 3
223#expect:2
3516
3617"ab" - "b"
3718#expect:0
38-
39- ##################################
40-
41- 5 * 3
42- #expect:15
43-
44- 5 * 0
45- #expect:0
46-
47- 0 * 0
48- #expect:0
49-
50- 3 * "HelloWorld"
51- #EXPECT:"HelloWorldHelloWorldHelloWorld"
52-
53- #bug: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
54- #[1, 2] * 2
55- ##expect:[1, 2, 1, 2]
56-
57- ##################################
58-
59- 6 / 3
60- #expect:2
61-
62- 5 / 2
63- #expect:2.5
64-
65- 5 / 1
66- #expect:5
67-
68- 0 / 5
69- #expect:0
70-
71- 5 / 0
72- #expect:"#ERR:division by zero"
73-
74- ##################################
75-
76- 6 // 3
77- #expect:2
78-
79- 5 // 2
80- #expect:2
81-
82- 5 // 1
83- #expect:5
84-
85- 0 // 5
86- #expect:0
87-
88- 5 // 0
89- #expect:"#ERR:division by zero"
90-
91- ##################################
92-
93- 5 % 3
94- #expect:2
95-
96- 5 % 2
97- #expect:1
98-
99- 5 % 1
100- #expect:0
101-
102- 0 % 5
103- #expect:0
104-
105- 5 % 0
106- #expect:"#ERR:modulo by zero"
107-
108- ##################################
109-
110- 2 ** 3
111- #expect:8
112-
113- 5 ** 2
114- #expect:25
115-
116- 5 ** 1
117- #expect:5
118-
119- 5 ** 0
120- #expect:1
121-
122- 0 ** 5
123- #expect:0
Original file line number Diff line number Diff line change 1+ ## Unary plus
2+
13+5
24#expect:5
35
1618+(+7)
1719#expect:7
1820
19- ##################################
21+ ## Unary minus
2022
2123-5
2224#expect:-5
3638-(+7)
3739#expect:-7
3840
39- ##################################
41+ ### Complement
4042
4143~5
4244#expect:-6
5456#expect:2
5557
5658~(+7)
57- #expect:-8
59+ #expect:-8
You can’t perform that action at this time.
0 commit comments