Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mx = raw_input("Enter a max value: ") #prompt for max for x and y
- xy = range(1,int(mx) + 1) #make list 1 - max
- def sp(n): #determine num spaces
- if n < 10: return 3
- elif n < 100: return 2
- else: return 1
- for x in xy: #iterate 1-max * 1-max
- for y in xy:
- print str(x * y) + " " * sp(x * y),
- print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement