Write the definition of a function power_to , which receives two parameters. The first is a double and the second is an int . The function returns a double .

If the second parameter is negative, the function returns zero. Otherwise it returns the value of the first parameter raised to the power of the second.

This is clearly homework. You must post your python code. Without code, there is no issue to solve.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.