On 2023-12-06 07:23:51 -0500, Thomas Passin via Python-list wrote:
> On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote:
> > Personally I would not use .ini style these days as the format does not
> > include type of the data.
>
> Neither does JSON.
Well, it distinguishes between some primi
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(t
Steve,
I would say converting to a number, as you eventually did, is the way to go.
When you compare character strings, it will not be in numeric order. Compare
"80" with "400" and since 8 is greater than 4, the comparison is over and
"80" is greater then "40" even though 80 is way less than 400.
On 12/9/2023 9:42 PM, Steve GS via Python-list wrote:
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: ")
On 10/12/23 15:42, Steve GS via Python-list wrote:
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: ")