Skip to content

Instantly share code, notes, and snippets.

@nalsi
Created November 26, 2012 19:45
Show Gist options
  • Save nalsi/4150195 to your computer and use it in GitHub Desktop.
Save nalsi/4150195 to your computer and use it in GitHub Desktop.
Print a matrix of numbers from 1*1 to 7*7
## Creator: Kai Li
## Time: 10/18/2012
## Task: Print a matrix of numbers from 1*1 to 7*7.
## Warning: It's not functioning properly, in that after everyline, there is an unexpected "None".
def nal(n):
i = 1
while i <= 7:
print n*i, '\t',
i = i + 1
def nal1(n):
i = 1
while i <= 7:
print nal(i)
i = i + 1
nal1(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment