116k views
1 vote
Write the definition of a function powerTo, which receives two numerical arguments. The second is guaranteed to be an integer. The function returns a number. If the second argument is negative, the function returns O. Otherwise, it returns the value of the first argument raised to the power of the second. For example, 1.2 and 3 are passed as arguments, the function returns 1.728.

1 Answer

3 votes
Hope it helps. Thanks.
Write the definition of a function powerTo, which receives two numerical arguments-example-1
User Michele Lacorte
by
6.3k points