0

Can anyone tell me how to take user input? ?

30th Aug 2016, 11:27 AM
ankush prasad
ankush prasad - avatar
3 Answers
- 1
X = input() #Remember X will be str,so if you want int X = int(input()) (pls watch my game at playground mamed Battleship_game and like it.I really want people to see it)
30th Aug 2016, 12:00 PM
Leshark
Leshark - avatar
- 1
In python 2.x, input() was used to take input from user but in python 3.x, raw_input() is used. You can also display message stating user what type of input should be entered. e.g. age=int(raw_input("Enter your age")) Hope this helps.
31st Aug 2016, 4:39 AM
Aman Kothari
Aman Kothari - avatar
- 2
raw_input()
30th Aug 2016, 1:43 PM
Emanuele Dobrilla
Emanuele Dobrilla - avatar