Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson2_diy3
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
73c94c88
authored
Apr 08, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ef7dc539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
list.py
main.py
list.py
0 → 100644
View file @
73c94c88
# py=['镒强','羽轩','宗乐','昕妤','振烨','建宸','家伟']
# print(py[::-1])
# a="Hello World"
# print(a[2:3])
# a="玛酷机器人少儿编程" #设置一个变量为“玛酷机器人少儿编程”
# print(a[1::5])
# print(a[1]+a[6])
# 建立列表a=[2,8,2,4,1,0,7,6],按顺序输出:
# 左起第4个元素与倒数第1个元素的和;
# 所有元素和;
# 最大的元素。
# 最小的元素。
# a=[2,8,2,4,1,0,7,6]
# print(a[3]+a[7])
# print(sum(a))
a
=
[
5
,
2
,
10
,
1
,
2
,
9
,
3
]
a
.
sort
()
print
(
a
)
\ No newline at end of file
main.py
0 → 100644
View file @
73c94c88
import
turtle
p
=
turtle
.
Pen
()
p
.
pensize
(
3
)
p
.
pencolor
(
'gold'
)
n
=
6
for
j
in
range
(
5
):
for
i
in
range
(
n
):
p
.
forward
(
100
)
p
.
left
(
360
/
n
)
p
.
left
(
360
/
5
)
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