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

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

4/16/2021 10:23:56 AM

Fohom Mike-eddie Guidy

5 Answers

New Answer

+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

+2

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

+2

I will do it Yaroslav. Thank you

0

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