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

 

divisibleBy6List


Given a value, return True if it's divisible by 6. 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].


divisibleBy6List([2, 4, 5]) → False
divisibleBy6List([2, 4, 4, 4, 4, 4, 4, 5]) → False
divisibleBy6List([5]) → False

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

def divisibleBy6List(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