Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # encoding: utf-8
- #
- # Copyright (c) 2009 Doug Hellmann All rights reserved.
- #
- """
- """
- #end_pymotw_header
- import fractions
- for v in [ 0.1, 0.5, 1.5, 2.0 ]:
- print '%s = %s' % (v, fractions.Fraction.from_float(v))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement