'''
Brian Crabtree
Program to simulate division of a random number and a number entered by the user
Demonstrates use of basic error handling.
'''

import random

#Generate the random number
number = random.randint(0, 100)

#Try to take in a number and do division
try:
    quotient =  number / float(input("What would you like to divide %d by? " %number))

#Catch error where a non-number is entered
except ValueError:
    print("That isn't a number!")

#Catch error where trying to divide by zero
except ZeroDivisionError:
    print("You can't divide by zero!")

#Print result if no errors reached
else:
    print("Your quotient is: %f" %quotient)

#Closing statement
finally:
    print("Thanks for using this program!")
