+ 1
Where is the error in my code?
My code below seems correct but it isn't valid when i run it age = int(input()) name = input() # your code goes here if age >= 18: print("Welcome ",name) else: print ("Sorry")
5 Answers
+ 6
the issue in the code is, that the output has an additional whitespace between "Welcome" and name.
as you are using comma to separate the print() statement, you don't need an extra space. this is only necessary when concatenating the output with the "+" operator
+ 4
Fohom Mike-eddie Guidy , for the future please use a tag to mention the programming language you are talking about.
thanks
+ 3
I will do it Yaroslav.
Thank you
+ 2
Thank you Lothar, it works now.
Have a nice day
0
Hi! your code works perfectly! what you don't like?