输入与输出

#输入
username = input('my name is :') #输入字符串
age = int(input('how old are you:')) #输入数字
#输出
print(username)
#用占位符方式输出
print('your name is %s'%username)
print('your age is %d'%age)
posted @ 2022-03-27 21:21  lllwy  阅读(19)  评论(0编辑  收藏  举报