Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- print '{:^3} {:6} {:6} {:6}'.format('e', 'x', 'x**2', 'isinf')
- print '{:-^3} {:-^6} {:-^6} {:-^6}'.format('', '', '', '')
- for e in range(0, 201, 20):
- x = 10.0 ** e
- y = x * x
- print '{:3d} {!s:6} {!s:6} {!s:6}'.format(e, x, y, math.isinf(y),)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement