On 04/13/2015 08:56 AM, Steven D'Aprano wrote:
On Mon, Apr 13, 2015 at 08:11:46AM -0400, Ken G. wrote:
I am sure there is an simple explanation but when I input
5 (as integer), resulting in 05 (as string), I get zero as the end
result. When running the code:
number01 = 0
Here you set the vari
On Mon, Apr 13, 2015 at 08:11:46AM -0400, Ken G. wrote:
> I am sure there is an simple explanation but when I input
> 5 (as integer), resulting in 05 (as string), I get zero as the end
> result. When running the code:
> number01 = 0
Here you set the variable "number01" to the int 0.
> numberentr
Hello,
In the code that you posted, as it is, you are:
1) defining a function (numberentry)
2) defining a global variable (number01) and setting it to 0
3) calling numberentry discarding the result
4) printing the value of the global variable number01
I would guess that you want to store the resul
Ken G. wrote:
> I am sure there is an simple explanation but when I input
> 5 (as integer), resulting in 05 (as string), I get zero as the end
> result. When running the code:
>
> START OF PROGRAM:
> Enter the 1st number: 5
>
> 05
>
> 0
> END OF PROGRAM:
>
> START OF CODE:
> import sys
>
> d
On 04/13/2015 08:18 AM, Dave Angel wrote:
On 04/13/2015 08:11 AM, Ken G. wrote:
I am sure there is an simple explanation but when I input
5 (as integer), resulting in 05 (as string), I get zero as the end
result. When running the code:
START OF PROGRAM:
Enter the 1st number: 5
05
0
END OF
On 04/13/2015 08:11 AM, Ken G. wrote:
I am sure there is an simple explanation but when I input
5 (as integer), resulting in 05 (as string), I get zero as the end
result. When running the code:
START OF PROGRAM:
Enter the 1st number: 5
05
0
END OF PROGRAM:
START OF CODE:
import sys
def numb
I am sure there is an simple explanation but when I input
5 (as integer), resulting in 05 (as string), I get zero as the end
result. When running the code:
START OF PROGRAM:
Enter the 1st number: 5
05
0
END OF PROGRAM:
START OF CODE:
import sys
def numberentry():
print
number01 = raw