Exercize to understand from three numbers which is more high

Frank Millman frank at chagford.com
Sun Jan 27 07:34:25 EST 2019


"^Bart"  wrote in message news:q2k1kk$1anf$1 at gioia.aioe.org...
>
> >    You need to do this exercize just by using if, elif and else,
> >    but in the quotation above, you use "=".
>
> We can use > < and =
>
> Now I wrote:
>
> number1 = int( input("Insert the first number: "))
>
> number2 = int( input("Insert the second number: "))
>
> number3 = int( input("Insert the third number: "))
>

[snip stuff that doesn’t work]

>
> But it doesn't work... :\
>

You have got to a starting point - you have three numbers. Good.

Where do you do go from here?

I would start with two of the numbers, and work out which one is higher.

Once you know that, you can compare that one with the third number, and work 
out which one is higher.

>From that, you can work out which one is the highest of all three.

Then you can apply the same logic to work out which is the lowest.

Give that a go, and come back here if you get stuck.

Frank Millman






More information about the Python-list mailing list