Question: Write a Python function that accepts a list of integers and a single integer, and returns a different named last, of the same length as

Write a Python function that accepts a list of integers and a single integer, and returns a different named last, of the same length as the list of integers. Where the elements of the list are 0 for each number in the original list that is not divisible by the single integer, and 1 for each number that is divisible. The function should work for a list of any length.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!