+ 1

how to make output from an input function only show the user response

isn't there anything more like a prompt that asks the question to the user in the alert instead of outputting the whole string? the example that uses input(s) outputs the whole thing, not just the user response which feels not ideal.

11th Jul 2016, 4:51 PM
Jon Openshaw
2 Answers
+ 2
variable_name = input() ... print(variable_name) If your want to display a message for the user, you can pass a string value to the input() function. E.g. variable_name = input('Please type your name: ') print(variable_name) Another option (and one that I prefer): print('Please type your name: ') name = input() print('Hello ' + name)
11th Jul 2016, 11:52 PM
Francisco GĂłmez GarcĂ­a
Francisco GĂłmez GarcĂ­a - avatar
0
I am new so i may be wrong. But please try this. put input("Enter your name ") and see what happens.
11th Jul 2016, 9:54 PM
Calubos D.
Calubos D. - avatar