Post Page Advertisement [Top]

python program

Write a program in python to compare three numbers and display larger ?

code:

x=int(input('ENTER FIRST NUMBER : '))
y=int(input('ENTER SECOND NUMBER : '))
z=int(input('ENTER THIRD NUMBER : '))
if x > y:
    if x > z:
        print('THE LARGEST VALUE IS ',x)
    else:
        print('THE LARGEST VALUE IS ',z')
else:
    if y > z:
        print('THE LARGEST VALUE IS ',y)
    else:
        print('THE LARGEST VALUE IS ',z)




Thank-you

No comments:

Post a Comment

Bottom Ad [Post Page]