#On the name of ALLAH and may the blessing and peace of Allah #be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam. #Author : Fouad Teniou #Date : 13/01/09 #version :2.4 import random class NegativeNumberError(ArithmeticError): """ attempted imporper operation on negative number""" pass class ZeroNumberException(ArithmeticError): """ attempted operation on zero with an agreed solution""" pass def errors(number): """ Raises NegativeNumberError if number less than 0, and raises ZeroNumberException if number is equal to 0.""" if number < 0: raise NegativeNumberError,\ "\n0: pass return number while 1: #get users answer to use Factorial program or exit the while loop Answer = raw_input("\npython "C:\Documents\Programs\classes\Factorial7 # # ########################### Factorial ref FT (2 D A Missr) ######################################################################################### #Version : Python 3.2 #import random #from functools import reduce #class NegativeNumberError(ArithmeticError): # """ attempted imporper operation on negative number""" # # pass #class ZeroNumberException(ArithmeticError): # """ attempted operation on zero with an agreed solution""" # # pass # #def errors(number): # """ Raises NegativeNumberError if number less than 0, and # raises ZeroNumberException if number is equal to 0.""" # # if number < 0: # raise NegativeNumberError("\n0: # pass # # return number #while 1: # #get users answer to use Factorial program or exit the while loop # Answer = input("\n