Hi im still relatively new to python and i am designing a multiplication table
that enables a user to input the size of the times table unfortunately ive
stumbled on the nested loops this is what i have right now:
a=raw_input('please enter a number')
b=int(a)
n=b+1
for row in range(1, n):
for col in range(1, n):
print "%3d " % (row * col),
print
the input which comes out is:
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
however i need something more on the lines of:
| 2 3 4 5
==================
2 | 4 6 8 10
3 | 6 9 12 15
4 | 8 12 16 20
5 | 10 15 20 25
does anyone know what i need the third nested for loop to be ? to make it like
the above example. Pleasee help me !!
_________________________________________________________________
Win New York holidays with Kellogg’s & Live Search
http://clk.atdmt.com/UKM/go/107571440/direct/01/
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor