Question: need help with these questions thx 4.2 Problem 1 (1 mark) Problem: Write a function that given two lists, returns the list of all the

need help with these questions thx

need help with these questions thx 4.2 Problem 1need help with these questions thx 4.2 Problem 1
4.2 Problem 1 (1 mark) Problem: Write a function that given two lists, returns the list of all the elements in the first list that do not occur in the second list. Your main program will allow the user enter two lists of numbers and end input with a blank line for list 1. List 1: 1 3 4 2 1 2 1 3 List 2: 1 1 3 [4, 2, 2] List 1: 1 3 4 2 1 2 1 3 List 2: 1 2 3 4 List 1: Hint: In your function, do not modify the list parameters as this will change the global lists! When parameters are mutable, changes to the parameters always change the globals!4.3 Problem 2 (1 mark) Problem: Write a function that given two lists, returns the list of all the elements that occur multiple times in both lists. The returned list should be in ascending order, without duplicates. Your main program will allow the enter two lists of numbers on one line separated by a semicolon and end input with a blank line. Lists: 1 3 4 2 1 2 1 3; 4 4 2 4 3 2 4 4 3 1 3 [2, 3] Lists : 1 1 2 3 4 5; 2 3 4 5 6 Lists : ; Lists: 4.4 Problem 3 (1 mark) Problem: Write a function that given a list of numbers, returns True if and only if all of the numbers in the list form an arithmetic progression, that is the difference between any two successive numbers in the list is the same. Your main program should allow the user to enter space-separated numbers as test lists, until a blank line is entered. List : 1 2 3 True List : 1 3 4 False List: 3 2 1 0 True List: 7 True List : 7 7 True List: 10 9 8 7 4 3 2 1 False List

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 Law Questions!