Alex Hall writes:
> On Mon, Sep 26, 2016 at 11:35 AM, Richard Koeman
> wrote:
>
> > def maximum(n1, n2):
> > print "the first number is" ,n1
> > print "the second number is", n2
> > if n1 > n2:
> > return
>
> Using the 'return' keyword will return whatever follows it (nothing, in
> thi
>
> This is my first time using this so I hope it works.
> I am trying to find out why this code doesnt work.
> Its simple. I want to find out which number is bigger.
>
Welcome!
>
> I hope you can help and that I am using this python feature properly.
> Thanks.
> The function prints the first t
On Mon, Sep 26, 2016 at 11:35 AM, Richard Koeman
wrote:
> This is my first time using this so I hope it works.
> I am trying to find out why this code doesnt work.
> Its simple. I want to find out which number is bigger.
>
> I hope you can help and that I am using this python feature properly.
>
On 26/09/16 16:35, Richard Koeman wrote:
> The function prints the first two print statements then nothing else
> happens.
>
> def maximum(n1, n2):
> print "the first number is" ,n1
> print "the second number is", n2
We know this works so far, so that's fine.
> if n1 > n2:
> return
B
Hi Richard,
The "return" statement does an early escape out of the currently
running function.
You have a "return" statement in your program that looks
unintentional. In an ideal world, the Python compiler would give a
warning about this because it's a common mistake. Unfortunately it
looks lik
This is my first time using this so I hope it works.
I am trying to find out why this code doesnt work.
Its simple. I want to find out which number is bigger.
I hope you can help and that I am using this python feature properly.
Thanks.
The function prints the first two print statements then noth