Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Robot:
- def __init__(self, name, color, weight):
- self.name = name
- self.color = color
- self.weight = weight
- def introduseSelf(self):
- print("Hello, my name is ", self.name)
- r1 = Robot("Tom", "Red", 30)
- r2 = Robot("Jerry", "Bue", 40)
- r1.introduseSelf()
- r2.introduseSelf()
Advertisement
Add Comment
Please, Sign In to add comment