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.

20th Oct 2022, 1:28 AM
Dinesh Annangi
6 Answers
+ 3
Dinesh Annangi Post your tried code.
20th Oct 2022, 4:40 AM
Riya
Riya - avatar
+ 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
20th Oct 2022, 6:28 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
what have you tried? are you getting errors or maybe the tests are failing?
20th Oct 2022, 1:40 AM
Apollo-Roboto
Apollo-Roboto - avatar
+ 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...
21st Oct 2022, 6:22 AM
Riya
Riya - avatar
+ 1
age=int(input()) name= input() if age >=18: print("Welcome " + name) else: print("Sorry")
21st Oct 2022, 5:12 AM
Dinesh Annangi
0
I tried this code but my tests are failing
21st Oct 2022, 5:13 AM
Dinesh Annangi