Commit 9232a7cc by BellCodeEditor

save project

parent 13f386cf
Showing with 6 additions and 0 deletions
class Car: class Car:
def __init__(self): def __init__(self):
self.color = "black" self.color = "black"
self.name = "BMW Z4"
self.speed = "3.7s" self.speed = "3.7s"
self.master = "林隽韬"
BMW_Z4 = Car() BMW_Z4 = Car()
print("车名:"+BMW_Z4.name)
print("颜色:"+BMW_Z4.color) print("颜色:"+BMW_Z4.color)
print("百里加速度:"+BMW_Z4.speed) print("百里加速度:"+BMW_Z4.speed)
print("车主:"+BMW_Z4.master)
\ 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