Oct-13-2017, 08:18 AM
(This post was last modified: Oct-13-2017, 08:19 AM by gruntfutuk.)
(Oct-13-2017, 03:01 AM)dtweaponx Wrote: The line numbers are you talking about up there in the code I posted or in python itself? Also is my if statement comparisons right? I’m kind of second guessing if I have it comparing correctly. Since it’s 3 if statements per input of line.ichabod801 will be referring to the line numbers as shown in the post you made - we have no idea what line numbers might apply in the editor you are using elsewhere (but would expect them to be the same if you have pasted like-for-like).
I'm also struck that the assignment was to sort three numbers into ascending order, not to determine the lowest, middle and highest. You might want to do a google search for sort algorithms (look at bubble sort and quick sort).
I note you are checking for some redundant conditions. If you've already established that first is smaller than anything else, then you have no need to check within the block where that condition applies to see if the second is smaller than the first.
Incidentally, what happens if the user enters some numbers that are the same?
I am trying to help you, really, even if it doesn't always seem that way