Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import fractions
- for s in ['0.5', '1.5', '2.0']:
- f = fractions.Fraction(s)
- print '%s = %s' % (s, f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement