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
d56974d8
authored
Feb 25, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
79353ebc
Pipeline
#8301
failed in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
6 deletions
diy1.py
ghfbdofifififififififiu.py
diy1.py
View file @
d56974d8
students
=
[
"悟空"
,
"小贝"
,
"八戒"
,
"波奇"
]
students
=
[
"悟空"
,
"小贝"
,
"八戒"
,
"波奇"
]
# 八戒因为要回老家,转学了,请将八戒从班级列表名单中删除
students
.
pop
(
2
)
# 八戒因为要回老家,转学了,请将八戒从班级列表名单中删除
?
students
.
append
(
"诺依"
)
print
(
students
)
# 班上来了一个新同学,名叫"诺依",请将"诺依"加入到班级名单里面
# 班上来了一个新同学,名叫"诺依",请将"诺依"加入到班级名单里面
?
# 班上准备开始辩论赛,分为红(red)、蓝(blue)组,
# 班上准备开始辩论赛,分为红(red)、蓝(blue)组,
# 请用切片将班级列表的前2名加入到红组,后2名加入到蓝组
red
=
students
[:
2
]
red
=
?
blue
=
students
[
2
:]
blue
=
?
red
=
(
red
)
blue
=
(
blue
)
b
=
"I love you"
for
i
in
b
:
print
(
i
,
end
=
" "
)
message
=
"I love you"
length
=
len
(
message
)
i
=
0
while
i
<
length
:
element
=
message
[
i
]
print
(
element
)
i
+=
1
import
random
key
=
"fdm,rkjgufyy小黑子gfrdhgt傻股656566图二发全额改革后台风过后6574份6534。阿巫3哦i飞毛腿¥逼frgujutrSB“”:|}{:“P{”P{“P{师傅64g4"
message
=
input
(
"请输入: "
)
fd
=
""
no
=
"@@$^&$
%
^^
%
"
for
i
in
b
:
str1
=
i
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
o
=
str1
+
str2
+
str3
fd
=
fd
+
o
list_message
=
list
(
fd
)
index
=
random
.
randint
(
0
,
len
(
fd
))
list_message
.
insert
(
index
,
no
)
result_message
=
""
.
join
(
list_message
)
print
(
result_message
)
li_text
=
list
(
o
)
for
i
in
range
(
len
(
o
)):
if
o
[
i
]
==
"p"
:
if
o
[
i
:
i
+
len
(
no
)]
==
no
:
text_left
=
text
[:
i
]
text_right
=
text
[
i
+
len
(
no
):]
message
=
text_left
+
text_right
print
(
message
)
result_message
=
message
[
0
]
for
i
in
range
(
1
,
len
(
message
)
-
1
):
if
i
%
3
==
0
:
result_message
=
result_message
+
message
[
i
]
print
(
result_message
)
ghfbdofifififififififiu.py
0 → 100644
View file @
d56974d8
message
=
"I love you"
length
=
len
(
message
)
i
=
0
while
i
<
length
:
element
=
message
[
i
]
print
(
element
)
i
+
1
=
i
message
=
"I love you"
length
=
len
(
message
)
i
=
0
while
i
<
length
:
element
=
message
[
i
]
print
(
element
)
i
=
i
+
1
\ 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