0

How do I properly do my input function

Name=input("what's your name?: ") print ("hello" name)

19th Sep 2025, 11:58 PM
Adeyemi Joy
Adeyemi Joy - avatar
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))
20th Sep 2025, 12:25 AM
Gulshan Mahawar
Gulshan Mahawar - avatar