Question: Question 1: [20 marks] a- Write a Python function new_List that prompts the user to enter non-negative integers. The function should keep on entering the
Question 1: [20 marks] a- Write a Python function new_List that prompts the user to enter non-negative integers. The function should keep on entering the integers and adding them to a list until a negative number is entered. Make sure that this list can be used in other parts of a program. (12 marks) b- Suppose that we want to call the above function and print the list of numbers that are multiples of 2 and 3 and the list of the remaining numbers. Write down the statements that implement the task. ( 8 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
