python语法(3)

输入

#coding=utf-8
#接收用户的输入
print ("how old are you?",end='')
age = input()  #input()是接受控制台输入的任何信息,python2中是raw_input()
print ("how tall are you?",end='')
height = input()
print ("how much do you weight?",end='')
weight = input()

print ("So,you're %r old,%r tall and %r heavy"%(age,height,weight))

#提示别人输入的内容
age=input("how old are you?")
height=input("how tall are you?")
weight=input("how much do you weight?")
print ("so,you are %s old,%s tall and %s heavy"%(age,height,weight))

  

posted on 2017-12-17 14:57  never1211  阅读(39)  评论(0编辑  收藏  举报

导航