Commit 67cfb9ea by BellCodeEditor

save project

parent 22354288
Showing with 19 additions and 0 deletions
class Car:
def __init__(self , name , master , speedTime):
self.speed = 0
self.master = master
self.name = name
self.speedTime = speedTime
BMW_Z4 = Car("BMW_Z4" , "林隽韬" , 2.3)
TOYOTA_86 = Car("TOYOTA_86" , "陈长浩" , 3.4)
def updata(self):
updata()
print(BMW_Z4.master + "的车是" + BMW_Z4.name)
print(BMW_Z4.name + "百里加速度是" + str(BMW_Z4.speedTime)+'s')
print(TOYOTA_86.master + "的车是" + TOYOTA_86.name)
print(TOYOTA_86.name + "百里加速度是" + str(TOYOTA_86.speedTime)+'s')
\ No newline at end of file
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