Skip to content
← Back to Community
the program is not working
Profile icon
ViekMishra

help me solve the problem it is not working pls anyone who can help me on this task.....

Voters
Profile icon
ViekMishra
Comments
hotnewtop
Profile icon
ch1ck3n
age = int(input("Enter your age")) if age > 15: print(" you can apply for scholarship") else: print(" you can not apply for scholarship") print("Thank you") elif age > 100: print("You should be dead")

First problem. You indented the elif statement. You should put it on the same line as the if statement.

Second problem. You used elif. if you use elif you will put the condition on the same line. if you don't want to do that you can just make it else.

Profile icon
ViekMishra

@ch1ck3n yeah bro thank you but the code your saying
age = int(input("Enter your age"))
if age > 15:
print(" you can apply for scholarship")
else:
print(" you can not apply for scholarship")
print("Thank you")
elif age > 100:
print("You should be dead")
it does not work

Profile icon
ch1ck3n

@ViekMishra i'm sorry, here's the corerct code

age = int(input("Enter your age")) if age > 15: print(" you can apply for scholarship") elif age > 100: print("You should be dead") else: print(" you can not apply for scholarship") print("Thank you")

please click the checkbox next to my name if this helped

Profile icon
ViekMishra

@ch1ck3n age = int(input("Enter your age"))
if age < 15:
print(" you can apply for scholarship")
elif age > 100:
print("You should be dead")
else:
print(" you can not apply for scholarship")
print("Thank you")

i guess this is the correct code bro

Profile icon
RYANTADIPARTHI

This is the correct code.

age = int(input("Enter your age")) if age > 15: print(" you can apply for scholarship") elif age > 100: print("you should be dead") else: print(" you can not apply for scholarship") print("Thank you")
Profile icon
ViekMishra

@RYANTADIPARTHI bro the code is not showing your dead try it