Ask coding questions

← Back to all posts
the program is not working
ViekMishra (0)

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

Comments
hotnewtop
ch1ck3n (2387)
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.

ViekMishra (0)

@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

ch1ck3n (2387)

@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

ViekMishra (0)

@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

RYANTADIPARTHI (6041)

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")
ViekMishra (0)

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