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
8030bc27
authored
Aug 08, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e30c6377
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
diy2.py
diy2.py
View file @
8030bc27
...
...
@@ -4,14 +4,12 @@ class Car:
self
.
master
=
master
self
.
name
=
name
self
.
speedTime
=
speedTime
def
updata
(
self
,
speedTime
):
self
.
speedTime
-=
speedTime
BMW_Z4
=
Car
(
"BMW_Z4"
,
"林隽韬"
,
2.3
)
TOYOTA_86
=
Car
(
"TOYOTA_86"
,
"陈长浩"
,
3.4
)
def
updata
(
self
):
updata
()
BMW_Z4
.
updata
(
0.4
)
TOYOTA_86
.
updata
(
0.7
)
print
(
BMW_Z4
.
master
+
"的车是"
+
BMW_Z4
.
name
)
print
(
BMW_Z4
.
name
+
"百里加速度是"
+
str
(
BMW_Z4
.
speedTime
)
+
's'
)
print
(
TOYOTA_86
.
master
+
"的车是"
+
TOYOTA_86
.
name
)
...
...
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