Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fractions
- for n, d in [(1, 2), (2, 4), (3, 6)]:
- f = fractions.Fraction(n, d)
- print '%s/%s = %s' % (n, d, f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement