FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/integration_tests/loop_02.py at main · sak-codes/lpython · GitHub
sak-codes
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
integration_tests
/
loop_02.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
96 lines (82 loc) · 1.6 KB
Breadcrumbs
lpython
/
integration_tests
/
loop_02.py
Copy path
File metadata and controls
96 lines (82 loc) · 1.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
from
ltypes
import
i32
def
test_loop_01
():
i
:
i32
=
0
j
:
i32
=
0
while
False
:
assert
False
while
i
<
0
:
assert
False
while
i
<
10
:
i
+=
1
assert
i
==
10
while
i
<
20
:
while
i
<
15
:
i
+=
1
i
+=
1
assert
i
==
20
for
i
in
range
(
5
):
assert
i
==
j
j
+=
1
def
test_loop_02
():
i
:
i32
=
0
j
:
i32
=
0
j
=
0
for
i
in
range
(
10
,
0
,
-
1
):
j
=
j
+
i
assert
j
==
55
for
i
in
range
(
5
):
if
i
==
3
:
break
assert
i
==
3
j
=
0
for
i
in
range
(
5
):
if
i
==
3
:
continue
j
+=
1
assert
j
==
4
def
test_loop_03
():
i
:
i32
=
0
j
:
i32
=
0
k
:
i32
=
0
while
i
<
10
:
j
=
0
while
j
<
10
:
k
+=
1
if
i
==
0
:
if
j
==
3
:
continue
else
:
j
+=
1
j
+=
1
i
+=
1
assert
k
==
95
i
=
0
;
j
=
0
;
k
=
0
while
i
<
10
:
j
=
0
while
j
<
10
:
k
+=
i
+
j
if
i
==
5
:
if
j
==
4
:
break
else
:
j
+=
1
j
+=
1
i
+=
1
assert
k
==
826
i
=
0
if
i
==
0
:
while
i
<
10
:
j
=
0
if
j
==
0
:
while
j
<
10
:
k
+=
1
if
i
==
9
:
break
j
+=
1
i
+=
1
assert
k
==
917
def
verify
():
test_loop_01
()
test_loop_02
()
test_loop_03
()
verify
()
Back
|
FazBrowse Home
|
New Git URL