Python

Python作品05-列印九九乘法表

Python作品05-列印九九乘法表

列印九九乘法表

•設計說明:

請撰寫一程式,列印九九乘法表,且呈現方式如下顯示,並且排列整齊。

image

# -*- coding: utf-8 -*-
"""
Created on Mon Nov 16 15:38:46 2020

@author: shou
"""

for i in range(2,10):
    for j in range(1,10):
        print("{}*{}={:<2}".format(i,j,i*j),end = ' ')
    print()
comments powered by Disqus
| copyright © 2020 Themefisher All Rights Reserved |