5 XP challenge

Repeat Multiplication

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Return factor raised to the nonnegative integer exponent. factor is -3 to 3; exponent is 0 to 8. Define exponent=0 to return 1, including factor=0.

Examples

InputReturn
factor = 2, exponent = 3

answer: 1 → 2 → 4 → 8. The result is 8.

8
factor = 3, exponent = 01

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.