首页 > 代码库 > python做题

python做题

Python题目

1.打印一个九九乘法表

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__author__ = ‘YeXiaodong‘
__QQ__= ‘12519460‘
__Email__ = ‘ye_xiaodong@qq.com‘
"""
x = 1
list_table = []
print(九九乘法表.center(100, ))
while x < 10:
    list_table.append(x)
    for i in list_table:
        res = {0} x {1} = {2:<2}.format(x,i,x*i)
        print(res,end=  )
    print(‘‘)
    x += 1

效果如下:

技术分享


python做题