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

 

amgreyson@gmail.com algebra-1 > divisibleBy3List
prev  |  next  |  chance

Given a value, return True if it's divisible by 3. Otherwise, return False. The digits parameter is a list containing the given value's digits in order, starting with the most significant (the first item in the list) and ending with the least significant (the last item in the list). Assume that each item in the list is positive and of type integer. For example, if the given value is 556, then digits will equal [5,5,6].


divisibleBy3List([5, 5, 6]) → False
divisibleBy3List([1, 2, 3]) → True
divisibleBy3List([5]) → False

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

def divisibleBy3List(digits):

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

Python Help

Difficulty: 175 Post-solution available

Copyright Nick Parlante 2017 - privacy