id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu apcs1 > listYucky7
prev  |  next  |  chance

Return the sum of the numbers in the array list. Except the number 7 is yucky, so it does not count and numbers that come immediately after a 7 also do not count.


listYucky7([1, 4]) → 5
listYucky7([1, 2, 7, 3]) → 3
listYucky7([1, 7, 8, 5, 7]) → 6

...Save, Compile, Run (ctrl-enter)

public int listYucky7(List<Integer> numsList) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy