5 XP challenge

Safe Requested Position

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

Task
Your mission

Return values[index] if the position exists, otherwise fallback. values has 0 to 30 integers from -100 to 100; index is -2 to 32; fallback is -100 to 100.

Examples

InputReturn
values = [4,8], index = 0, fallback = 94
values = [4,8], index = 1, fallback = 98

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.