Ask coding questions

← Back to all posts
Can someone tell me why it doesnt show that all of them are equal?
Pyrok

bill = int(input('bill has'))
jeff = int(input('jeff has'))
elon = int(input('elon has'))
bill_jeff = bill + jeff
bill_elon = bill + elon
elon_jeff = elon + jeff
if bill > jeff and bill> elon:
print('bill is richer')
elif jeff > bill and jeff > elon:
print(' jeff is richer')
elif elon > jeff and elon > bill:
print('elon is richer')
elif bill_jeff > elon:
print ('bill and jeff are richer than elon')
elif bill_elon > jeff:
print('bill and elon are richer than jeff')
elif elon_jeff > bill:
print('elon and jeff are richer than bill')
else:
print('all are equal to each other')

Voters
Pyrok
Comments
hotnewtop
InvisibleOne

Line 67 shoudl be elif bill_jeff == elon_jeff and elon_jeff = bill_elon and bill_jeff = bill_elon:

Pyrok

@InvisibleOne Thank you ill try it.