'''
Created on Sep 29, 2011

@author: rodger
'''
def totalBill(bill, customers):
    billwithTip = bill + (bill * 0.18)
    if customers < 6:
        return bill
    else:
        return billwithTip
    
    
print totalBill(100.00, 9)
print totalBill(100.00, 3)

def allDifferent(a,b,c):
    if (a == b):
        return False
    if (a == c):
        return False
    if (b == c):
        return False
    return True
  

def allDifferent2(a,b,c):
    if (a == b):
        return False
    elif (a == c):
        return False
    elif (b == c):
        return False
    else:
        return True
  
def allDifferent3(a,b,c):
    if (a == b) or (a ==c) or (b == c):
        return False
    return True


name = "Johnson, Ralph E."
print name
print name.split(",")

def lastFirst(name):
    pos = name.find(',')
    return name[pos+2:] + " " + name[:pos]

print lastFirst("Smith, John A.")
print lastFirst("Kim, Alison Mary Bell")

def odds(nums):
    answer = []
    for n in nums:
        if n % 2 == 1:  # if odd
            answer.append(n)
    return answer
