[Tutor] Find the Greatest number out of 3 (Python 3.7.0)

Adam Eyring adameyring at gmail.com
Tue Oct 6 19:31:04 EDT 2020


What's happening is that the print statements output strings. Change them
to variables like number1, number2, and number3 (no quotation marks) and it
should work.


On Tue, Oct 6, 2020, 7:24 PM Aliyan Navaid <aliyan.navaid at gmail.com> wrote:

>    number1 = input('Number1: ')
>
>    number2 = input('Number2: ')
>
>    number3 = input('Number3: ')
>
>
>
>    if number3 > number2 and number3 > number1:
>
>        print('Number 3')
>
>
>
>    elif number2 > number1 and number2 > number3:
>
>        print("Number 2")
>
>
>
>    else:
>
>        print('Number 1')
>
>
>
>
>
>    When given values Number1 = 423, Number 2 = 23 and Number 3 = 43 the
>    program outputs “Number3” even though the correct answer should’ve been
>    Number 1. Can somebody please explain why is this program not
> functioning
>    properly ?
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list