hey, I'm new to programming.
running Python 2.7.8 on windows 8 OS
Im on chapter 6 of a book called 'How to Think Like a Computer
Scientist-Learning with Python'
here is the code:
def printMultiples(n, high):
i = 1
while i<=high:
print n*i, "\t",
i = i + 1
print
def multipleTable(high):
i = 1
while i<=high:
printMultiples(i, i)
i = i + 1
print
print multipleTable(6)
when i run this code the result i get is
1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
6 12 18 24 30 36
None
Can someone please explain why does it print a triangular table and not a
square table like this one:
1 2 3 4 5 6
2 4 6 8 10 12
3 6 9 12 15 18
4 8 12 16 20 24
5 10 15 20 25 30
6 12 18 24 30 36
None
is there any documentation i can read on tables?
Thank You
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor