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
- max_len = len(str(xy[-1])) + 2
- for x in xy: #iterate 1-max * 1-max
- for y in xy:
- print str(x * y) + " " * (max_len - len(str(x * y))) ,
- print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement