Ad
Code
Diff
  • def power(num, p):
        answer = 1
        for i in range(p):
            answer = answer * num
        return answer
    • def power(num, p):
    • return num ** p
    • answer = 1
    • for i in range(p):
    • answer = answer * num
    • return answer