Question: Problem 4. Write a program using nested for loops that takes a positive in- teger n 2 7 and displays output like the following. First

Problem 4. Write a program using nested for loops that takes a positive in- teger n 2 7 and displays output like the following. First example, n-9 (odd) In this example, n 12 (even) Give some example output with your code Problem 5. Consider input L that is a list of integers. A In this part write a function that accepts a list L of integers and returns a new list where all of the entries equal to the largest number in L have been replaced by 0, except for the last occurrence of the maximum. The input list should not be changed B Write another function that does the same thing, but modifies the input array in place. Problem 6. In this problem we want to write a function that takes a list L the smallest index at which that number occurs A. Write a version of the function using loops and indices B. Write a function using python builtin methods (e.g., list methods) of integers and returns the second smallest integer in the list and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
