Re: [Tutor] Return Statement error

2014-10-13 Thread William Becerra
I am familiar with funtions, i didn't realize i had to write the return statement inside a function...Thank you all..that was very helpful On 13 Oct 2014 01:03, "Steven D'Aprano" wrote: > On Sun, Oct 12, 2014 at 04:38:54PM +0200, William Becerra wrote: > > Hello, I'm new to programming. I'm usin

Re: [Tutor] Return Statement error

2014-10-12 Thread Steven D'Aprano
On Sun, Oct 12, 2014 at 04:38:54PM +0200, William Becerra wrote: > Hello, I'm new to programming. I'm using Python 2.7.8 and Windows 8 OS > I was making an application to see if I understand how the return statement > works The `return` statement can only be used inside a function. That means you

Re: [Tutor] Return Statement error

2014-10-12 Thread Danny Yoo
On Oct 12, 2014 9:52 AM, "William Becerra" wrote: > > Hello, I'm new to programming. I'm using Python 2.7.8 and Windows 8 OS > I was making an application to see if I understand how the return statement works > I want my application to compare x and y and return either 1, -1 or 0. > I'm using ID

Re: [Tutor] Return Statement error

2014-10-12 Thread Joel Goldstick
On Sun, Oct 12, 2014 at 10:38 AM, William Becerra wrote: > Hello, I'm new to programming. I'm using Python 2.7.8 and Windows 8 OS > I was making an application to see if I understand how the return statement > works > I want my application to compare x and y and return either 1, -1 or 0. > I'm us

[Tutor] Return Statement error

2014-10-12 Thread William Becerra
Hello, I'm new to programming. I'm using Python 2.7.8 and Windows 8 OS I was making an application to see if I understand how the return statement works I want my application to compare x and y and return either 1, -1 or 0. I'm using IDLE Here is my code: print"Please write a value for x" x = ra