实验1

x1,y1 = 1.2,3.57
x2,y2 = 2.26,8.7

print('{:-^40}'.format('输出1'))
print('x1 = {}, y1 = {}'.format(x1,y1))
print('x2 = {}, y2 = {}'.format(x2,y2))

print('{:-^40}'.format('输出2'))
print('x1 = {:.1f}, y1 = {:.1f}'.format(x1,y1))
print('x2 = {:.1f}, y2 = {:.1f}'.format(x2,y2))

print('{:-^40}'.format('输出3'))
print('x1 = {:<15}, y1 = {:<15}'.format(x1,y1))
print('x2 = {:<15}, y2 = {:<15}'.format(x2,y2))

实验1实验1实验1

上一篇:pandas.DataFrame对行和列求和及添加新行和列


下一篇:实验二