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?

9th Jul 2021, 8:01 PM
Dancing coyote
Dancing coyote - avatar
2 ответов
+ 2
print('Enter your name:') x = input() print('Hello, ' + x)
9th Jul 2021, 8:10 PM
Anton
Anton - avatar
- 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()
9th Jul 2021, 9:36 PM
visph
visph - avatar