@@ -0,0 +1,734 @@
+# This program calculates a table of multiplications in modulo n%0A# Multiplication in modular arithmetic is done a*b(mod n)%0A# Christopher Hicks : 4/12/14%0Aclass colour: # Used for formatting text output via print.%0A   %09BOLD = '%5C033%5B1m'%0A   %09UNDERLINE = '%5C033%5B4m'%0A   %09END = '%5C033%5B0m'%0A%0An = raw_input(colour.BOLD + %22Enter the value of n: %22)%0An = int(n)%0A%0A# Print out the column headings at the top.%0Aprint '#'.rjust(3),%0Afor i in range(n):%0A%09print repr(i).rjust(3),%0Aprint colour.END%0A%0A# Print out the row headings and table data.%0Afor i in range(n):%0A%09# Justify to the right of a two character width column%0A%09print colour.BOLD + repr(i).rjust(3) + colour.END, %0A%09for j in range(n):%0A%09%09print repr((i*j)%25n).rjust(3), # Ensure addition is modulo n%0A%09print%0A

Create modulo_multiplication_table.py