Tax Eligibility Check

Take income and age, and check if eligible for tax (age > 18 and income > 5 L).

Logic BuildingIntermediate
Logic Building
# Take income and age
income = float(input("Enter income (in lakhs): "))
age = int(input("Enter age: "))

# Check tax eligibility
if age > 18 and income > 5:
    print("Eligible for tax")
else:
    print("Not eligible for tax")

Output

Enter income (in lakhs): 6
Enter age: 25
Eligible for tax

Enter income (in lakhs): 4
Enter age: 25
Not eligible for tax

Use AND to check both conditions.

Key Concepts:

  • Age must be > 18
  • Income must be > 5 lakhs
  • Both conditions must be true