python:File "", line 1, in

错误记录: python input 输入报错!!

age =input('you think you input number ?')
print age
you think you input number ?jackCheng
Traceback (most recent call last):
   return eval(raw_input(prompt))
  File "", line 1, in <module>
NameError: name 'jackCheng' is not defined

解决方案:如果在输入String 或者char类型的时候 输入的时候外层需要加” “或者’ ’
多嘴一句:int double 不需要

你可能感兴趣的:(python)