Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_1
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
8bd47869
authored
Nov 09, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
79353ebc
Pipeline
#3432
failed in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
1.py
2.py
3.py
diy1.py
1.py
0 → 100644
View file @
8bd47869
import
turtle
t
=
turtle
.
Turtle
()
for
i
in
range
(
6
):
t
.
left
(
60
)
t
.
forward
(
100
)
t
.
hideturtle
()
turtle
.
done
()
2.py
0 → 100644
View file @
8bd47869
import
random
kc
=
input
(
"今天星期几呀"
)
if
kc
==
"星期一"
:
print
(
"学习钢琴~"
)
elif
kc
==
"星期三"
:
print
(
"学习编程~"
)
elif
kc
==
"星期六"
:
print
(
"学习英语"
)
else
:
print
(
"学习国语~"
)
\ No newline at end of file
3.py
0 → 100644
View file @
8bd47869
import
random
name
=
input
(
"创造师你叫啥名?"
)
jp
=
[
"小卓一个"
,
"小卓的一个吻"
,
"小卓的一个拥抱"
,
"ipad"
,
"苹果13"
]
pj
=
random
.
choice
(
jp
)
print
(
"恭喜你,幸运的召唤师——"
+
name
+
"获得了"
+
pj
)
\ No newline at end of file
diy1.py
View file @
8bd47869
students
=
[
"悟空"
,
"小贝"
,
"八戒"
,
"波奇"
]
# 八戒因为要回老家,转学了,请将八戒从班级列表名单中删除
?
students
.
pop
(
"八戒"
)
# 班上来了一个新同学,名叫"诺依",请将"诺依"加入到班级名单里面
?
# 班上准备开始辩论赛,分为红(red)、蓝(blue)组,
# 请用切片将班级列表的前2名加入到红组,后2名加入到蓝组
red
=
?
red
=
students
[:
2
]
blue
=
?
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