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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:20
Geneva’s manager would like to see some additional information to make sales decisions.enter a formula in cell j4 using the if function to it whether or not the item beaded earrings should go on sale. it will go on sale if its current sales rank (in cell g4) is 8th or lower. (hint: if the cell value is greater than or equal to 8, it will go on sale.)if this condition is true, the item will go on sale. (hint: the if_true value should be “yes”.)if this condition is false, the item doesn’t need to go on sale. (hint: the if_false value should be “-”.)copy the formula created in cell j4 to the range j5: j14
Answers: 2
question
Computers and Technology, 22.06.2019 06:30
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
You know the right answer?
Complete the divisible_by(list1, int1) function below. As input, it takes a list of integers list1 a...
Questions
Questions on the website: 13722360