0
How to ask for a name and then print it in a sentence?
I want to write a program like this: a=input("Hey! What is your name?\n") print("Hello") a but I don't know the error.
2 Antworten
0
It should look like this: a= input("Hej, what ever...") print("\nHello, ", a)
0
you could also use concatenation but with a variable
name = input()
print("Hello " + name)
so whatever name you type in will be printed out as input automatically converts to string