#try to avoid input function
a = int(input("Enter your Age :"))
b = input("Enter your Gender(male or female):")
if a > 50:
print("You got 20% concession.")
elif a >= 40 and a <= 50:
if b == "female":
print("You got 10% concession.")
elif b == "male":
print("You got 5% concesssion.")
else:
print("Invalid input.")
elif a < 40:
if b == "female":
print("You got 3% concession.")
else:
print("You got 5% concession.")
else:
print("Invalid input.")
Click the run button. Try to avoid input() function.