CodeLab Academy 📞 9936 6696
← List Scratch · Level 7: Lists Quiz · 35 points ← #657 #659 →

#658. List sum

When the green flag is clicked, this script runs. What number will the cat say?
when green flag clicked
delete all of [numbers v]
add [20] to [numbers v]
add [25] to [numbers v]
add [13] to [numbers v]
set [i v] to (1)
set [total v] to (0)
repeat (length of [numbers v])
change [total v] by (item (i) of [numbers v])
change [i v] by (1)
end
say (total)

💡 Not sure? Build it in Scratch and try it out.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!