#-*-coding:utf-8-*-#Block Chinese garbled Scheme one (official recommendation)#This statement must be written in the top row#block Chinese garbled Scheme II (not recommended)" "#coding =utf-8" "#Input (), enter function, parameter is the text that is displayed when input" "In the python3.x version, the Python parser will use the input as a string and in the python2.x version, the Python parser will execute the input as a statement for example: name = input ("Name:")--User input name: tom--then the Python parser will get an error indicating that Tom is not defined--if the user input 1+4name:1+4--python parser will compile successfully, the value of print age is 5 so the same effect in python2.x, need to use Raw_ Input () function" "#Please enter your ageAge = Input ("Age :")#print (), printing function#Print Numeric typePrint("Age is %d"%Age )#Print a stringName ="Tom"Print("name is%s"%name)
Python python input and output