# Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. 
# Once 'done' is entered, print out the largest and smallest of the numbers. 
# If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. 
# Enter the numbers from the book for problem 5.1 and Match the desired output as shown. 
largestnumber = None
smallestnumber = None
while True:
    entnum = raw_input("Please enter a number: ")
    if entnum == "Done":
        break
    try:
        num = int(entnum)
    except:
        print ("Invalid input")
    if largestnumber == None:
        largestnumber = num
    if smallestnumber == None:
        smallestnumber = num
    if num > largestnumber:
        largestnumber = num
    if num < smallestnumber:
        smallestnumber = num
print "Maximum is", largestnumber
print "Minimum is", smallestnumber