Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-3
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
d39eb1a0
authored
Dec 23, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
3032e95e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
11 deletions
1.py
2.py
3.py
y.py
臂力挑战赛.py
1.py
0 → 100644
View file @
d39eb1a0
m
=
"诺依,周末一起去看动漫展吧!"
for
i
in
m
:
print
(
i
)
\ No newline at end of file
2.py
0 → 100644
View file @
d39eb1a0
m
=
"诺依,周末一起去看动漫展吧!"
l
=
len
(
m
)
i
=
0
while
i
<
l
:
e
=
m
[
i
]
print
(
e
)
i
+=
1
\ No newline at end of file
3.py
0 → 100644
View file @
d39eb1a0
import
random
key
=
"电动车保护协会筹备小组副部长"
m
=
"诺依,周末一起去看动漫展吧!"
key_m
=
""
db
=
"!@#$@#$
%
^&***&^&
%
$"
for
i
in
m
:
str1
=
i
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
text
=
str1
+
str2
+
str3
key_m
=
key_m
+
text
list_m
=
list
(
key_m
)
index
=
random
.
randint
(
0
,
len
(
key_m
))
list_m
.
insert
(
index
,
db
)
result_m
=
""
.
join
(
list_m
)
print
(
result_m
)
\ No newline at end of file
y.py
View file @
d39eb1a0
a
=
[
"华雄"
]
a
.
insert
(
1
,
"关羽"
)
print
(
a
)
c
=
[
"颜良"
,
"文丑"
]
a
.
extend
(
c
)
print
(
a
)
\ No newline at end of file
臂力挑战赛.py
View file @
d39eb1a0
name
=
'坤'
name
=
'坤'
power
=
11
hero
=
[
'赵一'
,
30
,
'丁二'
,
37
,
'孙五'
,
52
,
'王猛'
,
89
,
'周亮'
,
98
]
for
i
in
range
(
len
(
hero
))
:
for
i
in
range
(
5
,
10
:
if
i
%
2
==
1
and
hero
[
i
]
>=
power
:
hero
.
insert
(
i
-
1
,
name
)
hero
.
insert
(
i
,
power
)
...
...
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