Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_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
5051796d
authored
Apr 06, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
8ab53adb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
diy3.py
按顺序.py
diy3.py
View file @
5051796d
import
random
name
=
input
(
"你的名字?"
)
message
=
"诺依,周末一起去看动漫展吧!"
power
=
int
(
input
(
"你的臂力"
))
key
=
'唧唧复唧唧,木兰当户织。不闻机杼声,唯闻女叹息。'
list_hero
=
[
'1'
,
10
,
'2'
,
21
,
'3'
,
22
,
'4'
,
29
,
'5'
,
30
]
for
i
in
message
:
for
i
in
range
(
len
(
list_hero
))
str1
=
i
if
:
str2
=
random
.
choice
(
key
)
dict_
str3
=
random
.
choice
(
key
)
text
=
str1
+
str2
+
str3
\ No newline at end of file
c
=
""
.
join
(
text
)
print
(
c
)
按顺序.py
0 → 100644
View file @
5051796d
list_hero
=
[
'a'
,
27
,
'b'
,
47
,
'e'
,
30
,
'r'
,
70
]
list_hero
=
[
'a'
,
27
,
'b'
,
47
,
'e'
,
30
,
'r'
,
70
]
dict_hero
=
{
'a'
:
27
,
'b'
:
47
,
'e'
:
30
,
'r'
:
70
}
print
(
len
(
list_hero
))
print
(
len
(
dict_hero
))
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