#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author:Hobby
class PrintTable(object):
def __init__(self):
print("9x9乘法表")
self.multiplication_table()
def multiplication_table(self):
for i in range(1, 10):
for j in range(1, i+1):
print('%d*%d=%2s' % (i, j, i*j), end=' ')
print('\n')
if __name__ == '__main__':
pt = PrintTable()