about | help | code help+videos | done | prefs |
Having 3 lights in the room, turn on and off the lights based on the given boolean values l1, l2, l3 e.g. l1 = true, l2 = false, l3 = true, so the result should be "101" where "1" represent the light on and "0" (zero) represent the light off. lightSwitch(true, true, true) → "111" lightSwitch(true, true, false) → "110" lightSwitch(true, false, true) → "101" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy