0
Help please !
age=int(input()) name=input() if age>=18: print("welcome"+name) else: print("sorry")
6 Respostas
+ 6
youssef lemlih ,
> we would like to know what kind of issue you have. don't let us guess...
+ 6
youssef lemlih Pls be clear about error..
What's that error? Code working fine. You may have there logic error or wrong output? What is your task there? Add description.
Guessing, you may need space between "Welcome" And name? , capital W? Try
print( "Welcome "+ name)
Or
print( "Welcome", name)
Capital S in "Sorry" ..?
+ 5
youssef lemlih ,
your question is still incomplete. so people have to search for an exercise that matches with the code that you presented. why should we do this?
> it is your task. you expect to get help, so please do your best in preparing and presenting all relevant information.
> if the exercice is from the *python core* tutorial (exercise 20.1) you should read the task description carefully. this will lead you to the correct code:
(task description):
Write a program to control entrance to a club.
Only people who are 18 or older are allowed to enter the club.
The given program takes the age and the name of the person who tries to enter. Complete the program to output ****"Welcome"**** followed by the name of the person if they are allowed to enter the club, and ****"Sorry"**** if they are younger than the allowed age.
> Do not forget to put a ****space**** between "Welcome" and the name.
> check the upper and lower case spelling
+ 3
What help you need?
https://www.sololearn.com/discuss/333866/?ref=app
+ 1
He says there is an error
0
It's a test in Python and also I'm doing it right and it says wrong