Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
List of colors solution in Clear category for Multicolored Lamp by evarome10
class Lamp:
def __init__(self):
self.state = None
self.colors = ['Green', 'Red', 'Blue', 'Yellow']
def light(self):
if not self.state:
self.state = "Green"
return "Green"
elif self.state:
self.colors = self.colors[1:] + self.colors[0:1]
self.state = self.colors[0]
return self.colors[0]
Nov. 2, 2018