RE: A problem with str VS int.

2023-12-12 Thread AVI GROSS via Python-list
sday, December 12, 2023 3:58 AM To: python-list@python.org Subject: Re: A problem with str VS int. Op 12/12/2023 om 9:22 schreef Steve GS via Python-list: > With all these suggestions on > how to fix it, no one seems to > answer why it fails only when > entering a two-digit numbe

Re: A problem with str VS int.

2023-12-12 Thread dn via Python-list
On 12/12/23 21:22, Steve GS wrote: With all these suggestions on how to fix it, no one seems to answer why it fails only when entering a two-digit number. One and three work fine when comparing with str values. It is interesting that the leading 0 on a two digit worked. Still, one digit and

Re: A problem with str VS int.

2023-12-12 Thread Roel Schroeven via Python-list
Op 12/12/2023 om 9:22 schreef Steve GS via Python-list: With all these suggestions on how to fix it, no one seems to answer why it fails only when entering a two-digit number. One and three work fine when comparing with str values. It is interesting that the leading 0 on a two digit worked.

RE: A problem with str VS int.

2023-12-12 Thread Steve GS via Python-list
. This is now more of a curiosity as I did use the integer comparisons. SGA -Original Message- From: Python-list On Behalf Of dn via Python-list Sent: Sunday, December 10, 2023 12:53 AM To: python-list@python.org Subject: Re: A problem with str VS int. On 10/12/23 15:42, Steve GS via Python-list

Re: A problem with str VS int.

2023-12-09 Thread dn via Python-list
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: ")

Re: A problem with str VS int.

2023-12-09 Thread Thomas Passin via Python-list
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: ")

RE: A problem with str VS int.

2023-12-09 Thread AVI GROSS via Python-list
user can enter any text, they might enter ".01" or "hello" or al kinds of nonsense. If you converted to numbers and tested whether it failed, ... -Original Message- From: Python-list On Behalf Of Steve GS via Python-list Sent: Saturday, December 9, 2023 9:42 PM To:

A problem with str VS int.

2023-12-09 Thread Steve GS via Python-list
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"