+ 1
Club bouncer help
Getting a line 5 syntax error at name in the if statement age = int(input()) name = input() If age>= 18: print (“Welcome” name) else: print (“Sorry”)
9 Antworten
+ 4
Put a comma before name
+ 4
print("Enter Your Name:")
name = input()
print("Enter your age :")
age = int(input())
if age >= 18:
print("You Are Allowed To Enter!", name)
else:
print("Sorry? You Are Not Allowed to Enter!", name)
+ 2
Answer
age = int(input(""))
name = input("")
if age >= 18:
print("Welcome " + name)
else:
print ("Sorry")
+ 1
you have to create variable for 18
age = int(input(""))
name = input(" ")
a = int(18)
if age>=a:
print("Welcome "+name)
else:
print("Sorry")
0
Sheena I guess you forgot to concatenate the strings with a plus sign. Also, 'If' doesn't work.
0
Would be inevitable for me to scream from bottom of my heart "What a rocket science!'
0
age = int(input())
name = input()
If age>= 18:
print (“Welcome” name)
else:
print (“Sorry”)
0
Use this and it will work. Dont forget that you dont need to put plus between welcome and name, instead put comma.
age = int(input())
name = input()
# your code goes here
if age>= 18:
print("Welcome", name)
else:
print("Sorry")
0
This gonna work 😄 try it
age = int(input(""))
name = input(" ")
a = int(18)
if age>=a:
print("Welcome "+name)
else:
print("Sorry")