+ 5
Pls i need help with the code to use under python
Modify a code to display a friendly message to the user. Use string concatenation to join strings together and display a personalized friendly message. Expected output: 1. Nice to meet you , Mary 2. Nice to meet you, John
11 Respostas
+ 10
Read the previous lesson again. Pay attention to getting user input. Have a close look at which function is used.
+ 6
input means the user type in their name. store it in the variable "name". then use only the variable, not "Mary", not "John"
+ 4
What have you tried so far?
You know that we cannot see your code, don't you? Please link it.
+ 2
# Take the name as input
name = input()
input = "Mary", "John"
message = "Nice to meet you, " + "Mary"
# Display the message to the user
print (message)
How.cam I include the second name (John)
+ 1
You need to take input instead of hard-coding the name as "Mary". Get input an store it in the variable "name"
Remove the blank space between print and ()
+ 1
Pls help me out with the code I don't seem to understand that
I'm a beginner
+ 1
Emmanuel Ehem.
First, we hardly ever use a string variable to store more than 1 string.
Second, the "Mary" string in the message variable, is not the input string you provided.
So, to fix this, we use multiple variable to store multiple strings, each variable stores 1 string.
person1 = "Mary"
person2 = "John"
#Some code goes here..
Or we can use it without assign it to a variable, if it doesn't affect to the code..
+ 1
Thanks
I appreciate you all🤗🤗
0
# Take the name as input
name = "Mary"
# Use concatenation to join 2 strings
message = "Nice to meet you, " + "Mary"
# Display the message to the user
print (message)
0
# Take the name as input
name = input()
# Use concatenation to join 2 strings
message = "Nice to meet you, " +name
# Display the message to the user
print(message)
This is Write Answer
Budhabhushan Waghmare
@techbrainbooster
0
1 # Take the name as input
2 name = input ()
3
4 # Use concatenation to join 2 strings
5 message = " Nice to meet you, "
6
7 # Display the message to the user
8 print(message + name)
THIS IS THE CORRECT ANSWER ...
TRY IT.