Step 1 – Solving problems
When you ran your program you should have noticed two things:
- if you enter "Light" or "LIGHT" it doesn't work – only if you enter "light" all in lower case letters;
- the question only gets asked once
We'll solve these problems in the next two steps.
Solving the LIGHT problem
The problem is that, for Python, "LIGHT", "Light" and "light" are all different things. For you they all mean the same thing, but not for Python.
Solving this is dead easy.
![Code helper image](esc2/e3lower.jpg)
- CHANGE your line of code with the input on to say:
action = input("> ").lower() - This converts whatever the player types in to lower case letters. That means that "LIGHT" or "Light" become "light", so the IF line should now work
- Run your program: Run > Run Module and try entering "LIGHT". Python should now accept this
You can use .lower() on any input line just by adding it at the end. You can also use .upper() if you need to convert to upper case letters.