+ 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")

4th Nov 2022, 12:14 PM
Deepanshu Bargal
Deepanshu Bargal - avatar
1 Answer
+ 4
You are not printing anything. Use print() to make the output display in the console.
4th Nov 2022, 12:48 PM
Lisa
Lisa - avatar