本文共 927 字,大约阅读时间需要 3 分钟。
#99乘法表for a in range(10): for b in range(10): if a!=0 and b!=0: print(a,"*", b,"=", a * b)
执行结果:
1 * 1 = 11 * 2 = 21 * 3 = 31 * 4 = 41 * 5 = 51 * 6 = 61 * 7 = 71 * 8 = 81 * 9 = 92 * 1 = 22 * 2 = 42 * 3 = 62 * 4 = 82 * 5 = 102 * 6 = 122 * 7 = 142 * 8 = 162 * 9 = 183 * 1 = 33 * 2 = 63 * 3 = 93 * 4 = 123 * 5 = 153 * 6 = 183 * 7 = 213 * 8 = 243 * 9 = 274 * 1 = 44 * 2 = 84 * 3 = 124 * 4 = 164 * 5 = 204 * 6 = 244 * 7 = 284 * 8 = 324 * 9 = 365 * 1 = 55 * 2 = 105 * 3 = 155 * 4 = 205 * 5 = 255 * 6 = 305 * 7 = 355 * 8 = 405 * 9 = 456 * 1 = 66 * 2 = 126 * 3 = 186 * 4 = 246 * 5 = 306 * 6 = 366 * 7 = 426 * 8 = 486 * 9 = 547 * 1 = 77 * 2 = 147 * 3 = 217 * 4 = 287 * 5 = 357 * 6 = 427 * 7 = 497 * 8 = 567 * 9 = 638 * 1 = 88 * 2 = 168 * 3 = 248 * 4 = 328 * 5 = 408 * 6 = 488 * 7 = 568 * 8 = 648 * 9 = 729 * 1 = 99 * 2 = 189 * 3 = 279 * 4 = 369 * 5 = 459 * 6 = 549 * 7 = 639 * 8 = 729 * 9 = 81
转载地址:http://uowux.baihongyu.com/