tft每日頭條

 > 生活

 > python 改進九九乘法表

python 改進九九乘法表

生活 更新时间:2024-07-02 21:37:34

while循環

row=1

while row<=9:

line=1

while line<=row:

print(f'{row}*{line}={row*line}',end=' ')

line =1

print()

row =1

python 改進九九乘法表(Python九九乘法表)1

for循環

for row in range(1,10):

for line in range(1,10):

if line<=row:

print(f'{line}*{row}={line*row}',end=' ')

print()

python 改進九九乘法表(Python九九乘法表)2

python 改進九九乘法表(Python九九乘法表)3

python 改進九九乘法表(Python九九乘法表)4

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关生活资讯推荐

热门生活资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved