>The idea is to print out a multiplication table on the command line
>with numbers lining up in the ones column. I want to eventually
>emulate programs like top with their spacing. But this code is mostly
>for my amusement. How would you make this work?
>
Try print string formatting using %
>>>p
On May 14, 2005, at 20:09, Aaron Elbaz wrote:
> The idea is to print out a multiplication table on the command line
> with numbers lining up in the ones column. I want to eventually
> emulate programs like top with their spacing. But this code is mostly
> for my amusement. How would you make this
I've been racking my brain and am right now feeling nauseous from not
being able to figure out such a simple problem. Here's the code:
#r=10
#line=1
#
#def spaces(r):
#return r/10
#
#while line-1 < r:
#for i in range(r):
#print str((i+1)*line) + ' '*spaces(r),
#line=line+1
#