Question: PYTHON Task A) Create a function called separate (numbers, threshold) that takes two arguments: numbers: a list of integers threshold: an integer The function should

PYTHON

Task A)

Create a function called separate (numbers, threshold) that takes two arguments: numbers: a list of integers threshold: an integer The function should return two lists: the first list should contain all elements from numbers less than the threshold, and the second list should contain all elements with numbers greater than or equal to the threshold.

Task B)

Create a function that integrates an integer n as a parameter. The function should return a multiplication table from 1 to n as a array with n rows and n columns.

print(multiplication_table(3)) #will write out the following:

[[1, 2, 3],

[2, 4, 6],

[3, 6, 9]]

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!