[Solved] person is eligible to play on the team


Here are few quick points I noticed:

1.Indentation issue for the if statement in the age condition.
This if statement should ideally be within the if statement of gender==f.

  1. The way python requires you to write/use “and” condition. You can look at the syntax here https://www.learnpython.org/en/Conditions

  2. If someone enters an age out of the range required, there should be display on the screen such as female but not eligible.

  3. Its always good to introduce certain print statements as part of debugging to see how/where your code is reaching upto while executing.

The below piece of code should help

name=input("Enter ur name ")
gender=input("Enter ur gender ")
if gender=="f":
    age=float(input("enter ur age "))
    if age <=12 and age >=10:
        print ("ur eligible")
    else:
        print("female but not eligible"              )
elif gender=="m":
     print ("male not allowed")

1

solved person is eligible to play on the team