Jul-17-2018, 02:07 PM
Hello everyone,
I'm a new user of Python and I'm learning from the beginning.
I'm trying to make a code that ask for three numbers and show the bigger.
I've started with "if" and "and" to test, but it doesn't work well...follow the code:
Anybody could help me?
Thanks in advance!
Henry
I'm a new user of Python and I'm learning from the beginning.
I'm trying to make a code that ask for three numbers and show the bigger.
I've started with "if" and "and" to test, but it doesn't work well...follow the code:
n1=int(input("N1: ")) n2=int(input("N2: ")) n3=int(input("N3: ")) if n1 > (n2 and n3): print(n1)In this case I wrote just for the variable n1 (only for test), but when I put N1=5; N2=10 and N3=1, for example, it return "5", but in my opinion the code shouldn't return anything because 5 isn't bigger than 10.
Anybody could help me?
Thanks in advance!
Henry