1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Pow inside Python function

Discussão em 'Python' iniciado por Stack, Novembro 23, 2024.

  1. Stack

    Stack Membro Participativo

    Edit: this was a stupid mistake and probably won't help you find an answer to your problem... I was jung and just started learning to code

    I know that I can use num ** pow as an alternative but just to for the future I want to understand why the following code does not work:

    def math(num, pow):
    return pow(int(num), int(pow))
    # the return keyword returns the result
    pass

    print(math(2, 4))

    Continue reading...

Compartilhe esta Página