+ 2
Whats problem on my code in python?
i make this code on code playground like this : s = input ("name pls:") print(s) it work fine, but i try it on pc (python ver 2.7.1+) the output show eror like this: Trace back (most recent call last): s = input ("name pls:") file "<string>" ,line 1 , in <module> NameError :name 'dwi' is not defined please some one help me
4 Respuestas
+ 3
With Python before 3 you need to use the raw_input() function rather than the 'input()' one in most of case (to get raw string at return, and not let interpreter try to evaluate the user entry (your example error message is probably related to the fact you have tried to enter something with 'dwi' and Python don't found a variable so named ;))
+ 3
python v2 is different from python 3
+ 3
you need to install python 3 on your pc
+ 1
thanks i ll uodate my python