Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Multicolored Lamp by kdim
class Lamp:
colors = ["Green", "Red", "Blue", "Yellow"]
count = -1
def __init__(self):
pass
def light(self):
self.count = (self.count + 1) % 4
return self.colors[self.count]
June 11, 2023
Comments: