'''
Created on Sep 22, 2014

@author: Susan
'''



def isVowel(char):
    return char.lower() in 'aeiou'




def countOfLetterThreeTimes(title, letter):
    # return true if letter occurs in title at least three times
    # scan the word character by character in a while loop 
    # why doesn't this work?
    count = 0
    pos = 0
    while (count < 3 ):
        if title[pos] == letter:
            count += 1
        pos += 1
    return True



# Now return the phrase from the beginning until 
# the word that has the third letter
def phraseThroughWordWithThirdLetter(title, letter):
    count = 0
    pos = 0
    
 


title = "the goose is on the loose that is it"
print countOfLetterThreeTimes(title, "o")

print phraseThroughWordWithThirdLetter(title, "o")
print phraseThroughWordWithThirdLetter(title, "e")
print phraseThroughWordWithThirdLetter(title, "t")
print phraseThroughWordWithThirdLetter(title, "s")



