+ 1

what is wrong with this code? s = input('enter number: ') print (s)

6th Aug 2016, 2:54 AM
lego guy
lego guy - avatar
5 odpowiedzi
+ 7
@Kannan Vellaichami, raw_input() and input() are Python 2 functions which accepts input as a string and integer respectively. Python 3 uses input() function only. @Lego guy, the code is correct. When you run it, it will request for user input and then print the input.
6th Aug 2016, 5:10 PM
Chuma Umenze
+ 3
nevermind. it was just a problem with my python interpreter
6th Aug 2016, 4:36 AM
lego guy
lego guy - avatar
+ 2
use raw_input instead of just input
6th Aug 2016, 4:27 PM
Kannan Vellaichami
Kannan Vellaichami - avatar
+ 2
thanks guys
6th Aug 2016, 5:38 PM
lego guy
lego guy - avatar
+ 1
nothing is wrong . do you face an error ?
6th Aug 2016, 3:27 AM
Mohammad Amin Delshad
Mohammad Amin Delshad - avatar