Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-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
0ca16b87
authored
Jul 20, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
cc43ca29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
diy1.py
s.py
你干嘛~~哈哈~~哎哟~~.txt
新建 文本文档.txt
diy1.py
deleted
100644 → 0
View file @
cc43ca29
name
=
input
(
'你叫啥名啊?'
)
power
=
int
(
input
(
'你臂力多少啊?'
))
list_hero
=
[
'猴三'
,
10
,
'猴一'
,
21
,
'猴五'
,
22
,
'猴队长'
,
29
,
'猴七'
,
30
]
for
i
in
range
(
len
(
list_hero
)):
if
i
%
2
==
1
and
list_hero
[
i
]
>=
power
:
list_hero
.
insert
(
i
-
1
,
name
)
list_hero
.
insert
(
i
,
power
)
break
print
(
list_hero
)
dict_hero
=
{
'猴三'
:
10
,
'猴一'
:
21
,
'猴五'
:
22
,
'猴队长'
:
29
,
'猴七'
:
30
,}
print
(
dict_hero
)
s.py
0 → 100644
View file @
0ca16b87
with
open
(
r"C:\Users\61936\Desktop\新建 文本文档.txt"
,
'r'
,
encoding
=
'utf-8'
)
as
jj
:
a
=
jj
.
readlines
()
print
(
a
)
#print(jj.read())
#jj.write('🐖jjj🐖jjj🐖\n')
#jj.write('📕jjj📕jjj📕\n')
#jj.write('🐀jjj🐀jjj🐀\n')
\ No newline at end of file
你干嘛~~哈哈~~哎哟~~.txt
0 → 100644
View file @
0ca16b87
小强:11本
小强:11本
李明:15本
小兰:12本
小丽:11本
李文:9本
张伟:16本
新建 文本文档.txt
0 → 100644
View file @
0ca16b87
😀😀😀
😀😀😀
🐖🐖🐖
📕📕📕
🐀🐀🐀
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