+ 1
No output
class Phone: def make_call(self): print("making phone call") def play_game(self): print("playing game") def set_color(self,color): self.color = color def set_cost(self,cost): self.cost = cost def show_color(self): return self.color def show_cost(self): return self.cost p1 = Phone() p1.set_cost(500) p1.set_color("blue")
1 Odpowiedź
+ 4
You are not printing anything. Use print() to make the output display in the console.