If I enter a one-digit input or a three-digit number, the code works but if I enter a two digit number, the if statement fails and the else condition prevails.
tsReading = input(" Enter the " + Brand + " test strip reading: ") if tsReading == "": tsReading = "0" print(tsReading) if ((tsReading < "400") and (tsReading >= "0")): tsDose = GetDose(sReading) print(tsReading + "-" + tsDose) ValueFailed = False else: print("Enter valid sensor test strip Reading.") I converted the variable to int along with the if statement comparison and it works as expected. See if it fails for you... Steve -- https://mail.python.org/mailman/listinfo/python-list