Question: 1- Write your own scripts to perform the following tasks: a) A for loop that multiplies all even numbers from 2 to 10. b)
1- Write your own scripts to perform the following tasks: a) A for loop that multiplies all even numbers from 2 to 10. b) A for loop that assigns the values 10, 20, 30, 40, and 50 to a vector. 2- Given the vector x=[1 8 3 9 0 1] use a for loop to: a) Add up the values of all elements in x. b) Compute the cumulative sum, i.e 1; 9; 12; 21; 21; 22, of the elements in x.
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
Here are the scripts in Python for the tasks youve described python Task ... View full answer
Get step-by-step solutions from verified subject matter experts
