Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1* solution in Clear category for Multicolored Lamp by kosarev.b
class Lamp:
def __init__(self):
self.state = ['Green', 'Red', 'Blue', 'Yellow']
self.i = -1
def light(self):
self.i +=1
return self.state[self.i % 4]
April 4, 2019