0
Needing Help with user input in Python
1 name = input("Enter your name: ") 2 3 print("Hello, " + name) No matter what I try with the above code, I can seem to get it to work. I keep getting syntax errors. I don't know what I am supposed to do with it. Can anybody help me with this?
2 Respostas
+ 2
print('Enter your name:')
x = input()
print('Hello, ' + x)
- 1
name = input("Enter your name:")
works well too...
but in code coaches / practices, you are not supposed to print anything when taking input...
so, just do:
name = input()