Commit 8030bc27 by BellCodeEditor

save project

parent e30c6377
Showing with 4 additions and 6 deletions
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment