Please can someone help me with my code🥺.. it's not running | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Please can someone help me with my code🥺.. it's not running

# 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

20th Jul 2023, 1:15 PM
Deborah Usman
Deborah Usman - avatar
12 Answers
+ 6
Deborah Usman your code is incomplete See the second comment after the "nice to meet you " remove (,) when you string pass "nice to meet you" then use '+' and then name (when we concatenate the string then use plus ('+')) after that print the message.
20th Jul 2023, 1:29 PM
Sakshi
Sakshi - avatar
+ 4
See this and more read about concatenation in python course https://code.sololearn.com/c94Ox4oIoq9X/?ref=app
20th Jul 2023, 1:45 PM
Sakshi
Sakshi - avatar
+ 2
Deborah Usman , there is a syntax error in your code. You forgot to add a plus sign to concatenate the two strings. and print operator is missing.. Use this: message = "Nice to meet you, " + name look this modified version.. name = input() message = "Nice to meet you, " + name print(message)
20th Jul 2023, 1:48 PM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 2
Awwn.. thank you 🙈.. I've done it
20th Jul 2023, 1:56 PM
Deborah Usman
Deborah Usman - avatar
+ 2
You need to concatenate the message you are trying to output. message = "Nice to meet you, " + name This should work properly.
22nd Jul 2023, 3:52 AM
Leeroy Mokua
Leeroy Mokua - avatar
+ 1
the code worked when I ran it
20th Jul 2023, 2:03 PM
Boniface Ushie
Boniface Ushie - avatar
+ 1
You can use the f string function in python for the same result Name = input("Type your name: ") Then print the fstring like this Print(f"nice to meet you {name}")
21st Jul 2023, 5:44 PM
Jon
Jon - avatar
+ 1
Deborah Usman # 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)
21st Jul 2023, 6:42 PM
Milad
Milad - avatar
+ 1
Thank you
21st Jul 2023, 6:43 PM
Deborah Usman
Deborah Usman - avatar
+ 1
Remove (,) and add + operator in between the two strings u want to add
22nd Jul 2023, 4:32 AM
A rohit Kumar
A rohit Kumar - avatar
0
I've tried that, but it's still not working
20th Jul 2023, 1:38 PM
Deborah Usman
Deborah Usman - avatar
0
Write print (message) after the third comment
22nd Jul 2023, 11:23 AM
Arpita Kumari
Arpita Kumari - avatar