'''
Created on Sep 8, 2014

@author: Susan
'''

phrase = "Duke Blue Devils"
print phrase[0]
print phrase[-3]
print phrase[1:3]
print phrase[5:10] + phrase[:4]
print (phrase[phrase.find('ev'):]).upper()



name = "Darth Vater" 
print name.lower() 
nameV = "VVDarth VaterVVV" 
print name.strip("V") 
print nameV.strip("V") 
print nameV.strip('V') 
print name.find("Vater") 
print name.find("D") 
print name.replace("Vat","Tat") 
print "mississippi".replace("ss", "pp") 
print "type".endswith("e") 
print "type".startswith("e") 
print name.replace("a","o").lower() 

word = "September"

def mystery(word):
    answer = ""
    for ch in word:
        if ch.lower() != 'e':
            answer = answer + ch
    return answer
      
def mystery2(word):
    count = 0
    for ch in word:
        count = count + 1
    return count

def mystery3(word):
    answer = 0
    for ch in word:
        if ch.lower() != 'e':
            answer = answer + 1 
    return answer      
        
print mystery("September")
print mystery("August")
print mystery2("September")
print mystery2("August")
print mystery3("September")
print mystery3("August")

def mystery4(phrase):
    count = 0
    for word in phrase.split():
        count = count + 1
    return count
        
def mystery5(phrase):
    hold = phrase.split()
    answer = hold[0]
    for word in hold[1:]:
        if word[0].lower() != 'b':
            answer = answer + " " + word
    return answer
        
        
print mystery4("How big is big John Boy Brook")
print mystery5("How big is big John Boy Brook")
print mystery4("The Big Blue Ocean is cold")
print mystery5("The Big Blue Ocean is cold")
