0

Why 0^0 is valid in python ?

I just got challenged by solo learn and there was 0**0 in a try block I thought it will raise an exception but I was wrong. Is this same for every other compiler? Is there any other language out there having the same property.

15th Apr 2019, 3:37 PM
Yugabdh
Yugabdh - avatar
3 Antworten
+ 1
0**0 is 1. It's a math feature 😉
15th Apr 2019, 6:16 PM
portpass
+ 1
Anything to the power of 0 is 1...even 0😁😉
23rd Apr 2019, 7:25 PM
Trigger
Trigger - avatar
0
Try that on your scientific calculator then
24th Apr 2019, 12:03 AM
Yugabdh
Yugabdh - avatar