Run the flag for a demo of finding a letter in a word function. The demo program does not provide input validation (check for a blank entry, more than one letter, or entering a non-letter). Validation is left as an exercise for the coder. I also include a line of code that will convert the found letter to uppercase in one line of code. Yes, 3 lines of code to find the letter and 1 to convert it... Very easy... You could convert the case of a whole word by looping through the function the length of the word and saving the output.
I built this as part of a hangman game for my computer science students. It does not use lists or other "clever" options that can be found elsewhere. It simply locates the letter's position and then also chooses the uppercase letter that matches that position from a string. It could be changed to convert to lower case by using the string "abcdefghijklmnopqrstuvwxyz" instead of the uppercase string.