Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Multicolored Lamp by vby
color={1:'Green', 2:'Red',3:'Blue', 0:'Yellow'}
class Lamp:
def __init__(self):
self.inv=0
def light(self):
self.inv+=1
return color[self.inv % 4]
Feb. 3, 2020