+ 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.
2 odpowiedzi
+ 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)
0
I am new so i may be wrong. But please try this. put input("Enter your name ") and see what happens.