Question: create the following functions in python, and explain steps thank you. h) Write a function that takes in a string of non-negative integers separated by
create the following functions in python, and explain steps thank you.
h) Write a function that takes in a string of non-negative integers separated by a space and returns the sum of the integers in the string (e.g., Input: 12 23 56, output: 91)
i) Write a function that takes in a list of string representation of integers and returns a list of those integers (e.g., Input: [12, 45, 78], output: [12, 45, 78])
j) Write a function that takes in a list of integers and returns a True if the given list of integers is in increasing order. (Each integer is strictly larger than the integer before it. Use a while loop for this question).
k)Write a function that takes in a list and changes each elements in the list to a negative if the element at that location was a positive number, positive if the number at that location was a negative number, and SOMethiNG for anything else example: input my_list: [1, -2 True, a] output:my_list:[ -1, 2 , SOMethiNG, SOMethiNG]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
