Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
Print(pow (2,2,3)) ans is 1 how?
2 Answers
+ 3
Sai Deepika Kathiri , the third argument if present applies the modulo operation so (2**2)%3 => 1. You can read more here: https://docs.python.org/3.5/library/functions.html#pow
0