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
b0a0a84c
authored
Jan 18, 2026
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
79353ebc
Pipeline
#13240
failed in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
diy1.py
diy1.py
View file @
b0a0a84c
students
=
[
"悟空"
,
"小贝"
,
"八戒"
,
"波奇"
]
import
random
pw
=
"今交换机我记得天怎么【X=0 9D= Q想二胡未婚夫迫切发脾气吃分切群殴IP父亲哦怕红为烧为小321恶贝,2212时代全球只的23442只委屈,,。。;’【】【【pp我二位请二工区客,,。/‘;【【】、】’;,。/你463655453626272889219102付安抚钱阿多诺阿多诺//‘;。。’】】。"
# 八戒因为要回老家,转学了,请将八戒从班级列表名单中删除
we
=
"今天想吃红烧小贝,2只2只,我请客,你付钱。"
?
#for i in range(len(pw)):
# print(pw[i],end="")
# 班上来了一个新同学,名叫"诺依",请将"诺依"加入到班级名单里面
s
=
""
?
for
i
in
we
:
#print(i,end="")
# 班上准备开始辩论赛,分为红(red)、蓝(blue)组,
q1
=
random
.
choice
(
pw
)
# 请用切片将班级列表的前2名加入到红组,后2名加入到蓝组
q2
=
random
.
choice
(
pw
)
red
=
?
text
=
i
+
q1
+
q2
blue
=
?
s
=
s
+
text
print
(
s
)
\ 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