Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Python

Does anyone know how to ask the user to enter there name then say "hello (user)"?

6th Sep 2019, 2:44 PM
clowns arecoming
clowns arecoming - avatar
18 Answers
+ 3
The thing is Lothar,i went through it and couldn't find how to take an input then use that in something else. E.g. what I'm asking
6th Sep 2019, 6:59 PM
clowns arecoming
clowns arecoming - avatar
+ 13
name = input ("Please enter your name:") Print ("hello ", name)
6th Sep 2019, 2:48 PM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
+ 8
This is pure basics. I recommend to go through the python tutorial to learn more about it. https://www.sololearn.com/Course/Python/?ref=app
6th Sep 2019, 4:58 PM
Lothar
Lothar - avatar
+ 8
Hot today and 4 up votes for non-question 😐
7th Sep 2019, 10:35 AM
ABADA S
ABADA S - avatar
+ 3
U r welcome
6th Sep 2019, 2:52 PM
Eliya Ben Baruch
Eliya Ben Baruch - avatar
+ 3
Yes it is eassy first we need to take a input and than add that it to yout string. name = input("enter your name please: ") print("Welcome {a}!".format(a = name))
7th Sep 2019, 6:01 PM
Code WithShubh
Code WithShubh - avatar
+ 2
Thank you :)
6th Sep 2019, 2:50 PM
clowns arecoming
clowns arecoming - avatar
+ 2
name = input ("Please enter your name :") Print (f"hello {name}")
7th Sep 2019, 6:28 PM
Muhammad Mehran Bin Azam
Muhammad Mehran Bin Azam - avatar
+ 2
name = input ("Please enter your name :") Print ("hello {}".format(name))
7th Sep 2019, 6:29 PM
Muhammad Mehran Bin Azam
Muhammad Mehran Bin Azam - avatar
+ 2
name = input ("Please enter your name :") Print ("hello "+name)
7th Sep 2019, 6:30 PM
Muhammad Mehran Bin Azam
Muhammad Mehran Bin Azam - avatar
+ 1
I'm not doing homework, I'm practicing for my NEA Piña
7th Sep 2019, 8:07 AM
clowns arecoming
clowns arecoming - avatar
+ 1
u must send a letter to your customer and ask him/her name. then put the name in your code. Good luck Coder. :))
7th Sep 2019, 1:20 PM
Ermiya
Ermiya - avatar
+ 1
name = input("Tell me your name") print("hello " + name)
7th Sep 2019, 1:57 PM
Nicolae Casîr
Nicolae Casîr - avatar
0
use the input method of python and do remember one thing that this function will give you the input in string. user_name = input("Enter you name: ") print(f"Hello {user_name}")
7th Sep 2019, 2:59 PM
Pawan Chhangani
Pawan Chhangani - avatar
0
you could do print("hello" input("*whispers* uhh what was your name again?")) or something like that
8th Sep 2019, 6:38 AM
William
0
uhh sorry about my last post i forgot to put a comma after the hello part
8th Sep 2019, 6:39 AM
William
0
name=input("enter your name:") Print("hello",a)
18th Feb 2020, 9:47 AM
Pranith Sundar
Pranith Sundar - avatar
0
name=input("enter your name:") Print("hello"+ name)
8th Oct 2020, 9:25 AM
Moamed Garn
Moamed Garn - avatar