python 用while语句打印99乘法表

# coding:utf-8

# form_future_import print_function    //在python2中引入python3中print函数的语法的语句





# 1.总共有9列
# 2.每行中的列数,就是当前的行号
# 3.乘式的第一个数代表得是列,第二个数代表行
row = 1
column = 1

while row <= 9:
	while column <= row:
		print('%d*%d=%d '%(column,row,column*row),end='') # end=''//表示不让换行
		column += 1	
	print('')
	column = 1
	row += 1

 

posted @ 2019-07-05 21:11  水果、、  阅读(1894)  评论(0编辑  收藏  举报