Where is the error in my code? | Sololearn: Learn to code for FREE!


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")

4/16/2021 10:23:56 AM

Fohom Mike-eddie Guidy

5 Answers

New Answer


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


Fohom Mike-eddie Guidy , for the future please use a tag to mention the programming language you are talking about. thanks


Thank you Lothar, it works now. Have a nice day


I will do it Yaroslav. Thank you


Hi! your code works perfectly! what you don't like?