subject

Complete the divisible_by(list1, int1) function below. As input, it takes a list of integers list1 and an integer int1. It should return a list with all the integers in list1 where the integer is divisible by int1. For example, divisible_by([2, 9, 4, 19, 20, -3, -15], 3) should return the list [9, -3, -15]. 1 def divisible_by(listi, n):
2 # code goes here
3 pass
4
5 if _name == "__main__":
6 # use this to test your function
7 test_list = [2, 9, 4, 19, 20, -3, -15]
8 print(divisible_by(test_list, 3))

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 14:00, marilyn73471
Just a heads up these questions are relating to a program known as gimp. (these are all fill-in-the-blank)will give brainliest-! the tool option allows you to blur the edges of the selection making it look less sharp. which option do you choose in the add layer mask dialog box to turn your selection into a mask? is a type of filter that distorts a layer making it appear like you’re looking through dirty glass. in which drop-down menu do you find the option to add a blur to your background image layer? what shape appears when you’ve completed making your selection with the free select tool (to let you know you’ve reached the beginning of your selection)? when using the toggle quick mask, everything outside of the selection becomes a color. when painting with the color with the toggle quick mask on, it removes part of your selection making it smaller. when painting with the color with the toggle quick mask on, it adds to your selection making it larger. to use the paths tool, click and add (a tiny circle).to close your selection when using the paths tool, press and hold while clicking the first anchor point you created. the tool works just like the free select tool by clicking around an image to select it.
Answers: 2
image
Computers and Technology, 22.06.2019 15:30, micahpauleen748
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, solikhalifeoy3j1r
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
You know the right answer?
Complete the divisible_by(list1, int1) function below. As input, it takes a list of integers list1 a...

Questions in other subjects:

Konu
Mathematics, 30.04.2021 02:30
Konu
Mathematics, 30.04.2021 02:30
Konu
Mathematics, 30.04.2021 02:30
Konu
Mathematics, 30.04.2021 02:30