0

I have a problem, can anyone help?

I have just started learning Python. I am on the course Python for Beginners. It's chapter 4 Data Structure lesson 20.2 there is a code to write. The code is a if/else code. The problem is when my if statement if correct the command is print("Welcome" + name) The code is working but there is no space between Welcome and the name. And my code is exactly what is provided in the solution.

20th Nov 2022, 4:58 AM
Ansham
Ansham - avatar
4 Respuestas
+ 4
Ansham , by using the comma notation you can get rid of this issue: python is inserting a space. print("Welcome", name)
20th Nov 2022, 12:08 PM
Lothar
Lothar - avatar
+ 2
Thanks for the help
20th Nov 2022, 6:20 AM
Ansham
Ansham - avatar
+ 1
Try adding a space before you close the quotation mark? print("Welcome " + name)
20th Nov 2022, 4:59 AM
Tibor Santa
Tibor Santa - avatar
0
So according to your question, proper code is given below:- name = input("Enter the number:") print("welcome"+name)
27th Nov 2022, 12:13 PM
Anonymous
Anonymous - avatar