Why is False**False = 1?
Hi everyone... i ran into this : >>> 2**(1=="1") In a challenge... and the answer was : 1 I dont really get it why false ** false is 1!!?? Can anyone please explain!? Thank you.
(n^y) /(n^y) = (n/n) ^(y-y) => (n/n)^(0)=> 1, at school in math we learn that if n=0, 0^0 is indefined
False is convertible to 0. Whatever int ** 0 == 1.
Long story here: https://en.m.wikipedia.org/wiki/Zero_to_the_power_of_zero tl,dr: One of these things in maths we just agree upon - or not. 😉 Anyway: Python follows this rule, so that's how that challenge gets to its result.
The number is true, so it is 2**0, in math 0 degree of the number is 1
I think, i got it now... thanks to all...
Okay... thats true in math with any numbers except 0, but i still dont get it why 0**0 = 1 in python... in math 0**0 = 0
No it's 1 in math too
I have tried every way I could find but still I can't display my local images ..what am I doing wrong?
Pls rectify the errors.
I cant understand what the problem here is. Can anyone help me out? the system in sololearn called it an error in test case 1
Izzy the iguana code coach