ScratchData LogoScratchData
Back to jkibbe's profile

T$C - Find the of Sum of a List of Numbers template

JKjkibbe•Created March 4, 2016
T$C - Find the of Sum of a List of Numbers template
0
0
5 views
View on Scratch

Instructions

To complete this challenge, you need to put together the given blocks so that the program finds the sum of all of the numbers in the list. All of the blocks that are needed have been provided; just put them together (don't add any or change them). In the Python programming language, it is even easier to do this, with less code overall and only one variable instead of two: nums = [1, 2, 3, 4, 5, 6, 7] total = 0 for i in nums: total = total + i print(total) Or a much faster version in Python -- just two lines! nums = [1, 2, 3, 4, 5, 6, 7] print(sum(nums)) Run it here https://repl.it/BWFP/5

Project Details

Project ID100374527
CreatedMarch 4, 2016
Last ModifiedMarch 8, 2016
SharedMarch 4, 2016
Visibilityvisible
CommentsAllowed