Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_2
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
0cf82d6a
authored
Sep 25, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e8551936
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
21 deletions
1.py
diy2.py
hh.py
1.py
deleted
100644 → 0
View file @
e8551936
class
Hero
:
def_init_
(
self
,
name
,
hp
.
attack
):
self
.
level
=
1
self
.
name
=
name
self
.
hp
=
hp
self
.
attack
=
attack
def
upgrade
():
yase
.
level
=
yase
.
level
+
1
yase
.
hp
=
yase
.
hp
+
50
yase
.
attack
=
yase
.
attack
+
4
yase
=
Hero
(
'后羿'
,
240
,
23
)
houyi
.
upgrade
()
print
(
"等级为:"
,
houyi
.
level
)
print
(
"血量为:"
,
houyi
.
hp
)
print
(
"攻击力为:"
,
houyi
.
attack
)
if
enemy
.
hp
>
0
:
info3
=
evemy
.
name
+
"还剩下"
+
str
(
enemy
.
hp
)
+
"血量"
info
=
info1
+
info2
+
info3
print
(
info
)
\ No newline at end of file
diy2.py
View file @
0cf82d6a
import
turtle
z
=
turtle
.
Pen
()
z
.
write
(
"三龙齐聚电视台,
\n
吾等就为屠龙来"
,
font
=
(
"Times"
,
18
,
"normal"
))
z
.
hideturtle
()
turtle
.
done
()
hh.py
0 → 100644
View file @
0cf82d6a
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