Exercize to understand from three numbers which is more high
^Bart
gabriele1NOSPAM at hotmail.com
Mon Jan 28 04:03:44 EST 2019
> Excellent! Glad I could help.
Thank you! :) I'm studying Python everyday and I try to do the best! :)
> 1. The last two lines appear to be indented under the 'if number3 < '
> line. I think you want them to be unindented so that they run every time.
I'm sorry but I didn't completely understand what you wrote about the
last two lines, please could you write how my code could be fixed?
> 2. When you have lines such as -
>
> if a == 1:
> do something
> if a == 2:
> do something else
>
> then if 'a' is equal to 1, there is no need to check for 'a' equal to 2.
>
> Python allows you to shortcut this as follows -
>
> if a == 1:
> do something
> elif a == 2:
> do something else
Finally I understood the differences between if and elif! Lol! :D
> Frank
Thank you very much for your patience! :)
^Bart
More information about the Python-list
mailing list