Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_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
f0a99aa3
authored
Nov 13, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
3fc4e625
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
1.py
diy.py
o
txt
1.py
0 → 100644
View file @
f0a99aa3
x
=
5
y
=
3
z
=
1
/
3
for
i
in
range
(
1
,
101
):
for
j
in
range
(
1
,
101
):
for
k
in
range
(
1
,
101
):
if
x
*
i
+
y
*
j
+
z
*
k
==
100
and
i
+
j
+
k
==
100
:
print
(
i
,
j
,
k
)
diy.py
View file @
f0a99aa3
来
=
777
class
Hero
:
print
(
来
)
def
__init__
(
self
,
name
,
hp
,
attack
):
self
.
level
=
1
self
.
name
=
name
# name:名字
self
.
hp
=
hp
self
.
attack
=
attack
# attack:攻击
def
upgrade
(
self
):
self
.
level
=
self
.
level
+
1
self
.
hp
=
self
.
hp
+
50
self
.
attack
=
self
.
attack
+
4
houyi
=
Hero
(
"后羿"
,
240
,
23
)
houyi
.
upgrade
()
print
(
"等级为:"
,
houyi
.
level
)
print
(
"血量为:"
,
houyi
.
hp
)
print
(
"攻击力为:"
,
houyi
.
attack
)
\ No newline at end of file
o
0 → 100644
View file @
f0a99aa3
txt
0 → 100644
View file @
f0a99aa3
《算经》中有一道很有趣的数学题:
鸡翁一值钱五,鸡母一值钱三,鸡雏三值钱一。
百钱买百鸡,问鸡翁、鸡母、鸡雏各几何?
(公鸡,母鸡,小鸡都必须要有)
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