| about | help | code help+videos | done | prefs |
sum_squares2
Given a list of numbers, compute the sum of the squares of the numbers. You had this problem before, but this time, you aren't allowed to use "for" or "range". Use "while" instead. (The idea is that you get more of a feel for what the computer is doing, step by step.) sum_squares2([1, 2, 3, 4]) → 30 sum_squares2([100, 200, 300, 400]) → 300000 sum_squares2([]) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 171 Post-solution available
Copyright Nick Parlante 2017 - privacy