Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

does anyone know how to make it print a sentence with persons name in it

yomicroyeewww
yomicroyeewww

i want to make it orint a persons name with a sentence in it

2 years ago
You are viewing a single comment. View All
1

I am assuming what you mean to ask is: when we take the name from the user using input statement, how can we print it back. Here's how:


name = input("What is your name?")
print("Hello " + name)


Output:
Hello (name of the person)

Please mark this as the answer if this is what you were looking for! Thanks!

2 years ago
2
Bookie0
Bookie0

@dhruvkumarrajan
add code blocks and syntax highlighting with the backslashes (`):

# your code here name = input("What is your name?") print("Hello " + name) # wow colors!

Screen Shot 2020-12-01 at 9.19.17 AM

2 years ago
1
Coder100
Coder100

no asking for marking as correct answer

@dhruvkumarrajan

2 years ago
1

@Coder100

oops... Sorry

2 years ago
1
Coder100
Coder100

no problem, now you know!

@dhruvkumarrajan

2 years ago