| about | help | code help+videos | done | prefs |
countuptoneg
Given a list of integers, return the number of integers before the first negative one. If there is no negative integer in the entire list, this should simply return the length of the list. Use this to practise with the "break" statement. countuptoneg([1, 2, 3, -4, 5, -6]) → 3 countuptoneg([-1, 2, 3, 4, 5, 6]) → 0 countuptoneg([1, 0, 2, 3, -4, 5]) → 4 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy