Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-1_DIY1
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
57d79cb3
authored
Jun 18, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
52b4cfd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
29 deletions
diy1.py
diy1.py
View file @
57d79cb3
n
=
int
(
input
())
import
turtle
来覅哦
i
进去看咯
iVS
反对
x
k
=
0
pen
=
turtle
.
Pen
()
while
n
>
0
:
list
=
[
"green"
,
"blue"
,
"red"
]
m
=
int
(
input
())
pen
.
speed
(
90
)
if
m
>
k
:
# 获得最大值
for
i
in
range
(
300
):
k
=
m
pen
.
color
(
list
[
i
%
3
])
n
=
n
-
1
pen
.
forward
(
i
)
print
(
k
)
pen
.
left
(
91
)
turtle
.
done
()
n
=
int
(
input
())
\ No newline at end of file
k
=
101
while
n
>
0
:
m
=
int
(
input
())
if
m
<
k
:
# 获得最小值
k
=
m
n
=
n
-
1
print
(
k
)
n
=
int
(
input
())
max
=
0
min
=
1001
while
n
>
0
:
m
=
int
(
input
())
if
max
<
m
:
#获得最大值
max
=
m
if
min
>
m
:
#获得最小值
min
=
m
n
=
n
-
1
print
(
max
-
min
)
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