number of occurance of a letter in a word
word = input("Enter a word: ")
letter = input("Enter a letter: ") count = word.count(letter) print("The letter", letter, "occurs", count, "time(s) in the word", word)word = input("Enter a word: ")
letter = input("Enter a letter: ") count = word.count(letter) print("The letter", letter, "occurs", count, "time(s) in the word", word)
Comments
Post a Comment