0

What is wrong with my code people 😥

def compare(num1,num2 ,num3): if num1==num2 and num2==num3: return 'all the same' if num1 != num2 != num3: return 'all different' if num1 == num2: return 'num1 is equal to num2' if num1 == num3 return 'num1 is equal to num3' if num2 == num3: return 'num2 is equal to num3'

5th Aug 2020, 1:25 PM
Nomvelo Xaba
7 Respuestas
+ 5
What is wrong with my code people 😥 def compare(num1,num2 ,num3): if num1==num2 and num2==num3: return 'all the same' if num1 != num2 != num3: return 'all different' if num1 == num2: return 'num1 is equal to num2' if num1 == num3: return 'num1 is equal to num3' if num2 == num3: return 'num2 is equal to num3'
5th Aug 2020, 1:31 PM
minirkk
minirkk - avatar
+ 5
welcome. Also a colon : is missing at the second last if statement.
5th Aug 2020, 1:35 PM
minirkk
minirkk - avatar
+ 4
identation is not proper
5th Aug 2020, 1:27 PM
minirkk
minirkk - avatar
+ 1
🙏thanks a lot
5th Aug 2020, 1:33 PM
Nomvelo Xaba
0
Pls help😥💔
5th Aug 2020, 1:26 PM
Nomvelo Xaba
0
How can I make it proper
5th Aug 2020, 1:29 PM
Nomvelo Xaba