程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python 99 multiplication table

編輯:Python

use for Nine nine multiplication table written

for i in range(1,10): # That's ok 
for j in range(1,i+1): # Column 
print(j,'*',i,'=',i*j,end='\t')
print()

use while Nine nine multiplication table written

i=1
while i<10: # That's ok 
j=1
while j<=i: # Column 
print(j,'*',i,'=',i*j,end='\t')
j+=1
print()
i+=1

communication

If you have a better solution or have different opinions , You can say what you want , Jointly improve progress !
I'm also Xiaobai , Dare to ask questions , Let's discuss , Learn together and make progress !


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved