初学Python几个小程序练习
发布时间:2020-12-20 12:52:38 所属栏目:Python 来源:网络整理
导读:使用格式化输出的三种方式实现以下输出 (name换成自己的名字,既得修改身高体重,不要厚颜无耻) name = 'ABDMLBM'height = 175weight = 140# "My name is 'Nick',my height is 180,my weight is 140"print('My name is %s,my height is %s,my weight is %s
name = 'ABDMLBM' height = 175 weight = 140 # "My name is 'Nick',my height is 180,my weight is 140" print('My name is %s,my height is %s,my weight is %s'%(name,height,weight)) print('My name is {},my height is {},my weight is {}'.format(name,weight)) print(f'My name is {name},my height is {height},my weight is {weight}')
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |