#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Factorial """ #end_pymotw_header import math for i in [ 0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6 ]: try: print '{:2.1f} {:6.2f}'.format(i, math.gamma(i)) except ValueError, err: print 'Error computing gamma(%s):' % i, err