Ad
  • Custom User Avatar

    Ignore case

  • Custom User Avatar

    The problem is that you are iterating through the characters of the lowercase version of your original, uncertainly cased string, and then checking how many times each of these lowercase characters appear on that original string. It's easy to see where this goes wrong.

    Adding this to the beginning of your function should fix it:

    word = word.lower()
    
  • Custom User Avatar

    You can print to input to the console.