print('this is my first program in pyCharm')
name = input('名字:')
age = input('年龄:')
job = input('工作:')
salary = input('工资:')
msg = '''
----- info of %s ----
Name: %s
Age: %s
Job: %s
Salary: %s
----- End ----
''' %(name, name, age, job, salary)
print(msg)
#打印出应的输出格式
关于占位符有:
s%: 字符串
d%: 整数
f%: 浮点数
网友评论