Created
September 24, 2015 19:12
-
-
Save binki/47e17004b8e843c4096b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
size = int(input('Enter the desired size of your table>')) | |
justwidth = 1 + int(math.log10(size*size)) | |
for y in range(1, size+1): | |
print(' '.join([str(x*y).rjust(justwidth) for x in range(1, size + 1)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment