Question: Please Use Python Programming Language EXERCISE 5 . Define a vector of integers with 5 elements . Write the following function . Given a vector

Please Use Python Programming Language
EXERCISE 5 . Define a vector of integers with 5 elements . Write the following function . Given a vector and two indexes, returns a vector where the values at the provided indexes are swapped . Example Input: my_vector = [40,51,62,73,84,95] Invoke function: swap(my_vector, 2, 4) . Output:[40,51,84,73,62,95]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
