Question: these are python programs for rookies so keep it as simple as possible. thanks. definitely leaving a like. 1. Write Python function that will take
1. Write Python function that will take parameter that is a list of list representing a square table of numbers. The function should compute and return a list that contains the sums of numbers in each row. For example if the input is 123 432 132 The output should be [6, 9, 6] 2. Write Python function that will take three input parameters. The first parameter should be a list, the second and third parameters should be integers that represent two locations in the list. The function should modify the list by swapping the elements at indices represented by the two integer parameters For example if the inputs to the functions are [6, 5, 3, 5, 7, 4,2). 2. 4. the function should swap items at indices 2 and 4 so the list should change to [6,5,7, 5. 3. 4. 2). Make sure that you check for integer parameters to be within the range of valid indices, otherwise the list should not change. The function should assign default values of 0 and -1 for the two integer parameters 3. Write Python function that will take list as a parameter and return a tuple that will consist of elements in the first half (or left half) of input list. Include the middle element if the list has odd number of items. For example, if the input list is [6.7.4.3. 2] the output should be (6, 7. 4). 4. Write Python program that will use list comprehension to create a list of even numbers between the two values entered by user (inclusive). For example, if user enters 3 and 12, the list should be [4, 6, 8, 10, 12)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
