Lazy Method

Before I’d gotten to this lesson, I’d already slapped a tolower around the player’s guess as it iterates through each letter, comparing against the letters in the hidden word. This allows the user to mix cases as much as he wants and still scores correctly. Saves writing a ton of unnecessary code and gives the user one less thing to worry about, or error message to deal with!

Privacy & Terms