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

 

gaurav1780@gmail.com 04_lists > positive_multiples
prev  |  next  |  chance

Define a function that when passed an integer list and an integer (say key), returns a list containing all POSITIVE items in the list that are divisible by key. The order of items in the resulting list should be the same as the order in which they occur in the original list.


positive_multiples([], 10) → []
positive_multiples([20], 10) → [20]
positive_multiples([-20], 10) → []

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

def positive_multiples(data, key):

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: 4 Post-solution available

Copyright Nick Parlante 2017 - privacy