[Solved] Faulty input behavior with conditionals [closed]


Your this part of code :

if (GenderSelect.lower() == "f"):
    print("Name: " + NameCreate + "\nAge: " + str(AgeSelect) + "\nGender: Female\n")
    gerror = 0
if (not(GenderSelect.lower() == "f" GenderSelect.lower() == "m")):
    gerror = 1

should be :

elif (GenderSelect.lower() == "f"):
    print("Name: " + NameCreate + "\nAge: " + str(AgeSelect) + "\nGender: Female\n")
    gerror = 0
else:
    gerror = 1

solved Faulty input behavior with conditionals [closed]