Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # encoding: utf-8
- #
- # Copyright (c) 2010 Doug Hellmann. All rights reserved.
- #
- """Split fractional from whole number part.
- """
- #end_pymotw_header
- import math
- for i in range(6):
- print '{}/2 = {}'.format(i, math.modf(i/2.0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement