⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
document
All Projects
document
Overview
Activity
Issues
Spent time
Gantt
Calendar
News
Documents
Wiki
Files
Download (466 Bytes)
Files
» 跑步机.py
UserName LastName
, 01/14/2025 07:36 PM
class
Run
:
def
__init__
(
self
):
self
.
xiaoming
=
75
self
.
xiaomei
=
45
def
run
(
self
):
self
.
xiaoming
-=
0.5
self
.
xiaomei
-=
0.5
print
(
f
"跑完步后小明的体重
{
self
.
xiaoming
}
,小美的体重
{
self
.
xiaomei
}
"
)
def
eat
(
self
):
self
.
xiaoming
+=
1
self
.
xiaomei
+=
1
print
(
f
"吃东西后小明的体重
{
self
.
xiaoming
}
,吃东西后小美的体重
{
self
.
xiaomei
}
"
)
after_run
=
Run
()
after_run
.
run
()
« Previous
1
…
64
65
66
67
68
…
437
Next »
(66-66/437)
Loading...