Question: What does the following code find? vl= {1, 2, 3, 4}; v2 ={3,6,4}; Do[If [!MemberQ[v2,v1[[i]]], v2=Append[v2, vl[[i]]]],{i,1, Length[vi]}]; Print[v2]; O Finds the union of two

 What does the following code find? vl= {1, 2, 3, 4};

What does the following code find? vl= {1, 2, 3, 4}; v2 ={3,6,4}; Do[If [!MemberQ[v2,v1[[i]]], v2=Append[v2, vl[[i]]]],{i,1, Length[vi]}]; Print[v2]; O Finds the union of two vectors v1 and v2 O It finds the elements in v1 that are not in v2. O It finds the intersection of the two vectors v1 and v2 O None of the choices

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!