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))
浙公网安备 33010602011771号