0
How do I properly do my input function
Name=input("what's your name?: ") print ("hello" name)
1 Risposta
+ 2
Adeyemi Joy
There is no problem with the input function, you just need to use the same variable name as defined i.e use `Name` instead of `name` in the print function . Another thing is just separate "hello" and Name by comma in the print function.
Here is the fixed code:
Name = input("what's your name?:")
print("hello", Name)
Other alternative ways:
print("hello "+Name)
print(f"hello {Name}")
print("hello {0}".format(Name))