Python学习日记-5-while循环输出九九乘法表

hfirst = 1
wfirst = 1

while hfirst <= 9:
    wfirst = 1
    while wfirst <= hfirst:
        print(str(wfirst)+"*"+str(hfirst)+"="+str(hfirst*wfirst),end=" ")
        wfirst+= 1
    print()
    hfirst+= 1

这里写图片描述

猜你喜欢

转载自blog.csdn.net/wuli_xiaoran/article/details/81484090
今日推荐