task1

发布时间:2022-06-23 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了task1脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

task.1.1

rint('hey,u')
print('hey','u')
x,y,z=1,2,3
print(x,y,z)
print('x=%d,y=%d,z=%d'%(x,y,z))
print('x={},y={},z={}'.format(x,y,z))
print(f'x={x},y={y},z={z}')
print(x)
print(y)
print(z)
print(x,end='')
print(y,end='')
print(z)

task1

 

 

task.1.2

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)) # {:.1f}
print('x2 = {:.1f}, y2 = {:.1f}'.format(x2, y2))
print('{:-^40}'.format('输出3')) 
print('x1 = {:<15.1f}, y1 = {:<15.1f}'.format(x1, y1))
print('x2 = {:<15.1f}, y2 = {:<15.1f}'.format(x2, y2))
print('{:-^40}'.format('输出3')) 

task1

 

print('x1 = {:>15.1f}, y1 = {:>15.1f}'.format(x1, y1)) 
print('x2 = {:>15.1f}, y2 = {:>15.1f}'.format(x2, y2))

 task1.3

name1, age1 = 'Bill', 19
name2, age2 = 'Hellen', 18
title = 'Personnel Information'
print(f'{title:=^40}')
print(f'name: {name1:10}, age: {age1:3}')
print(40*'=')

task1

 

脚本宝典总结

以上是脚本宝典为你收集整理的task1全部内容,希望文章能够帮你解决task1所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: