Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_4
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
e4471840
authored
Dec 07, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
22354288
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
diy2.py
gh.py
iio.py
y.py
diy2.py
0 → 100644
View file @
e4471840
class
jj
:
def
__init__
(
self
,
name
,
foot
,
skin
):
self
.
level
=
1
self
.
name
=
name
self
.
foot
=
foot
self
.
skin
=
skin
yuh
=
jj
(
2
,
4
,
"black"
)
print
(
yuh
.
name
)
\ No newline at end of file
gh.py
0 → 100644
View file @
e4471840
class
kd
:
def
__init__
(
self
,
foot
,
eye
):
self
.
foot
=
foot
self
.
eye
=
eye
def
upgrade
(
self
):
self
.
foot
=
self
.
foot
+
2
self
.
eye
=
self
.
eye
+
1
kd
=
kd
(
2
,
4
)
kd
.
upgrade
()
print
(
'蝌蚪的脚'
+
str
(
kd
.
foot
))
\ No newline at end of file
iio.py
0 → 100644
View file @
e4471840
class
Hero
:
def
__init__
(
self
,
name
,
hp
,
attack
):
self
.
level
=
1
self
.
name
=
name
self
.
hp
=
hp
self
.
attack
=
attack
def
upgrade
(
self
):
self
.
level
=
self
.
level
+
1
self
.
hp
=
self
.
hp
+
50
self
.
attack
=
self
.
attack
+
4
yase
=
Hero
(
'yase'
,
300
,
20
)
yase
.
upgrade
()
print
(
'亚瑟的血量'
+
str
(
yase
.
hp
))
y.py
0 → 100644
View file @
e4471840
i1
=
{
"数学"
:
99
,
"语文"
:
67
,
"英语"
:
100
}
i2
=
{
"数学"
:
89
,
"语文"
:
89
,
"英语"
:
92
}
i3
=
{
"数学"
:
100
,
"语文"
:
97
,
"英语"
:
98
}
h
=
{
"小明"
:
i1
,
"小红"
:
i2
,
"秀秀"
:
i3
}
while
True
:
print
(
"*"
*
30
)
name
=
input
(
"你的名字/(不查了写不差了):"
)
if
name
==
"不查了"
:
break
if
name
in
h
:
for
v
,
p
in
h
[
name
]
.
items
():
print
(
v
,
p
)
else
:
print
(
"名字不在"
)
\ 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