The provided answer to the Exponentiation assignment in Ep 3 only works for exponents greater than 0. I had expected it work at least for exponents of 0, but seq(0) has a length of 2, which was a bit unexpected. Perhaps exponentiation is therefore not the best example of what you can do with loops (at least not before conditionals allow you to test for negative/positive)?
Hi all,
The provided answer to the Exponentiation assignment in Ep 3 only works for exponents greater than 0. I had expected it work at least for exponents of 0, but seq(0) has a length of 2, which was a bit unexpected. Perhaps exponentiation is therefore not the best example of what you can do with loops (at least not before conditionals allow you to test for negative/positive)?
Cheers, koen