Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson13-diy2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f0e11aef
authored
Apr 01, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1f3efb4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
diy2.py
diy2.py
View file @
f0e11aef
def
func
(
n
):
import
turtle
if
n
<=
2
:
pen
=
turtle
.
Turtle
()
return
1
pen
.
color
(
'sienna'
)
else
:
w
=
turtle
.
Screen
()
value
=
func
(
n
-
1
)
+
func
(
n
-
2
)
w
.
bgcolor
(
'wheat'
)
return
value
pen
.
left
(
90
)
n
=
1
pen
.
up
()
while
func
(
n
)
<
20
:
pen
.
backward
(
150
)
n
=
n
+
1
pen
.
down
()
print
(
n
)
pen
.
forward
(
100
)
pen
.
left
(
30
)
\ No newline at end of file
pen
.
forward
(
50
)
pen
.
backward
(
50
)
pen
.
right
(
60
)
pen
.
forward
(
50
)
pen
.
backward
(
50
)
pen
.
left
(
30
)
pen
.
backward
(
100
)
turtle
.
done
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment