FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/tests/loop1.py at main · Smit-create/lpython · GitHub
Smit-create
/
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
/
tests
/
loop1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (32 loc) · 643 Bytes
Breadcrumbs
lpython
/
tests
/
loop1.py
Copy path
File metadata and controls
39 lines (32 loc) · 643 Bytes
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
def
test_factorial_1
(
x
:
i32
)
->
i32
:
if
x
<
0
:
return
0
result
:
i32
result
=
1
while
x
>
0
:
result
=
result
*
x
x
-=
1
return
result
def
test_factorial_2
(
x
:
i32
)
->
i32
:
result
:
i32
result
=
1
i
:
i32
for
i
in
range
(
1
,
x
+
1
):
result
=
result
*
i
return
result
def
test_factorial_3
(
x
:
i32
)
->
i64
:
if
x
<
0
:
return
0
result
:
i64
result
=
1
while
x
>
0
:
result
=
result
*
x
x
-=
1
return
result
def
main0
():
i
:
i32
i
=
test_factorial_1
(
4
)
i
=
test_factorial_2
(
4
)
j
:
i64
j
=
test_factorial_3
(
5
)
main0
()
Back
|
FazBrowse Home
|
New Git URL