# i want each table output to start from the first line of console

Page 1 of 1

## 2 Replies - 474 Views - Last Post: 25 August 2014 - 12:06 AMRate Topic: 2 Votes //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=351663&amp;s=289d773ad47f1e8696df84ed25836d96&md5check=' + ipb.vars['secure_hash'], cur_rating: 3, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 JKpybeginner

Reputation: 0
• Posts: 4
• Joined: 05-August 14

# i want each table output to start from the first line of console

Posted 06 August 2014 - 06:45 AM

# I want each and every table to display parellel to each other
# like 1x1=1   2x1=2   3x1=3   4x1=4
#        1x2=2   2x2=4   3x2=6  4x2=8

def main():
pass

if __name__ == '__main__':
main()
import sys
write = sys.stdout.write
num = int(input("Display tables upto: "))
i=0
j=1

for i in range(0,num):
for i in range(1,11):
print j,"x",i,"=",j*i

j+=1

#output
>>>
1 x 1 = 1
1 x 2 = 2
1 x 3 = 3
1 x 4 = 4
1 x 5 = 5
1 x 6 = 6
1 x 7 = 7
1 x 8 = 8
1 x 9 = 9
1 x 10 = 10

2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20

3 x 1 = 3
3 x 2 = 6
3 x 3 = 9
3 x 4 = 12
3 x 5 = 15
3 x 6 = 18
3 x 7 = 21
3 x 8 = 24
3 x 9 = 27
3 x 10 = 30

>>>

Is This A Good Question/Topic? 0

## Replies To: i want each table output to start from the first line of console

### #2 fatihmert

Reputation: 1
• Posts: 127
• Joined: 04-March 12

## Re: i want each table output to start from the first line of console

Posted 10 August 2014 - 02:32 AM

# I want each and every table to display parellel to each other
# like 1x1=1   2x1=2   3x1=3   4x1=4
#        1x2=2   2x2=4   3x2=6  4x2=8

def main():
pass

if __name__ == '__main__':
main()
import sys
write = sys.stdout.write
num = int(input("Display tables upto: "))
i=0
j=1

paralel = ""

for i in range(0,num):
for i in range(1,11):
paralel += "%s x %s = %s\t"%(j,i,j*i)
print paralel
j+=1

### #3 JKpybeginner

Reputation: 0
• Posts: 4
• Joined: 05-August 14

## Re: i want each table output to start from the first line of console

Posted 25 August 2014 - 12:06 AM

thanks buddy