+ 4

Recursion

write a function power that accepts two arguments, a and b and calculates a raised to the power b. Example: power ( 2, 3) = 8 Raise a TypeError with the message Argument must be integer or float if the inputs are anything other that ints or floats. Note: Don't use **

10th Oct 2017, 11:02 PM
Franklin Yaw Frimpong
Franklin Yaw Frimpong - avatar
4 Respuestas
+ 4
i just leaent recursion
10th Oct 2017, 11:09 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
10th Oct 2017, 11:18 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
I mean, it doesn't really use recursion but meh lmao xD https://code.sololearn.com/c2GSpv1yzJ1l/?ref=app
10th Oct 2017, 11:24 PM
LunarCoffee
LunarCoffee - avatar
+ 2
Yeah he never said it has to be a recursive function XD
10th Oct 2017, 11:26 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar