Advertisement
jonsurfs

Multiplication Table

Oct 14th, 2014
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def multTable():
  2.     maximum_value = int(input("How big of a multiplication table should I make?\n"))
  3.     table = ''
  4.     for x in range(1, maximum_value + 1):
  5.         for y in range (1, maximum_value + 1):
  6.             table = '\t'.join((table,'{0:2d}'.format(x*y)))
  7.         table = '\n'.join((table, '\n'))
  8.     print(table)
  9.  
  10. multTable()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement