Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_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
9bf3764e
authored
Feb 25, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
410ea9e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
dvojfdi.py
ft.py
dvojfdi.py
View file @
9bf3764e
'''s= {'F': 70, 'C': 67, 'H': 104,'I':105,'S':115}
print(s['C'])'''
'''s= {'F': 70, 'C': 67, 'H': 104,'I':105,'S':115}
s['H']=10
s['xh']=11
print(s)'''
'''s={'1':'zpj'}
s['1']='zpj'
s['1']='tsz'
s['2']='jxz'
s['3']='shs'
s['4']='zpj'
print(4)'''
\ No newline at end of file
ft.py
0 → 100644
View file @
9bf3764e
class
Hero
:
def
__init__
(
self
,
name
,
hp
,
sttack
):
self
.
level
=
1
self
.
name
=
name
self
.
hp
=
hp
self
.
sttack
=
sttack
def
upgrade
(
self
):
self
.
level
=
self
.
level
+
1
self
.
hp
=
self
.
hp
+
1
self
.
sttack
=
self
.
sttack
+
1
yase
=
Hero
(
"yase"
,
900
,
500
)
yase
.
upgrade
()
print
(
"血量为:"
yase
.
up
)
print
(
"攻击为:"
yase
.
attack
)
print
(
"等级为:"
yase
.
level
)
\ 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