- 3
Help plzz brozz!!! Python problem
Write a program to control entrance to a club. Only people who are 18 or older are allowed to enter the club. program takes the age of the person who tries to enter, and outputs "Allowed" if they are allowed to enter the club, and "Sorry" if they are younger than the allowed age.
5 Réponses
+ 4
Then re-read the lessons before you do the task.
+ 2
impulsive otaku 1000%SUPERCHARGED Full Burst
So you should learn it again. This will be better for you.
0
First of all take input in integer type then run a condition if else according to question....
I would suggest first try to do it by yourself if not able to then you can see my code...
#your code goes here
age = int(input())
if age>=18:
print("allowed")
else:
print("Sorry")
- 3
def checkage(age):
#get age
age=int(age)
#make age a number
if age>=18:
print('Allowed')
#check if age >=18
else:
print("Sorry")
#print sorry
checkage()
- 5
I came back to python after long so i couldn't do it