Question: Write a function called front ( ) that inputs a vector x and a number n and outputs the first n elements of x .
Write a function called front that inputs a vector x and a number n and outputs the first n elements of x When n is greater than lengthx your function should just output x
With n verify that your front function works on the vectors numeric seq by and cwaffles "friends", "work" Also verify with n that your front function works on one of the aforementioned vectors.
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
