Question: Part 1 : For the following problems you will be working with either vectors ( lists ) , or matrices ( lists of lists )
Part : For the following problems you will be working with either vectors lists or matrices
lists of lists For each question, you should write a lambda function that does what the question
asks. Unless otherwise specified, you may not call other functions within your lambda expression.
There is no need to validate the input, you can assume the adequate data type will be provided.
pt Write the lambda function vectorplusone that takes in a list as a parameter and
returns a new list with every element increased by one.
vectorplusone
pt Write the lambda function collatzsteps that takes in a list as a parameter, and
returns a new list that has removed any nonintegers and integers less than and replaces
every positive integer left number with a step in the hailstone formulas. As a reminder:
If a number is odd, it becomes n
If a number is even, it becomes n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
