0
Anyone of u pls solve this question for me ..I'm a beginner in python core and stucked in this question ..help me pls
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.
6 odpowiedzi
+ 3
Dinesh Annangi
Post your tried code.
+ 3
Hi! please, first take a python course for beginners if these lessons seem too difficult for you
Steps to learn Sololearn Python courses
https://www.sololearn.com/post/1446016/?ref=app
+ 2
what have you tried? are you getting errors or maybe the tests are failing?
+ 2
Dinesh Annangi your code is correct..may be print statement under if may have space in between ...if there is space,
print ("Welcome"+" "+ name)
Try like this...
+ 1
age=int(input())
name= input()
if age >=18:
print("Welcome " + name)
else:
print("Sorry")
0
I tried this code but my tests are failing