35 lines
581 B
Plaintext
35 lines
581 B
Plaintext
class Mobile:
|
|
def make_call(self):
|
|
print("i am making a call")
|
|
def play_game(self):
|
|
print("i am playing games")
|
|
|
|
m1=Mobile()
|
|
|
|
m1.make_call()
|
|
|
|
m1.play_game()
|
|
|
|
class Mobile:
|
|
def set_color(self,color):
|
|
self.color=color
|
|
def set_cost(self,cost):
|
|
self.cost=cost
|
|
def show_color(self):
|
|
print("black")
|
|
def show_price(self):
|
|
print("5000")
|
|
def make_call(self):
|
|
print("i am making a call")
|
|
def play_game(self):
|
|
print("i am playing games")
|
|
|
|
|
|
|
|
m2=Mobile()
|
|
|
|
m2.show_price()
|
|
|
|
m2.show_color()
|
|
|