Question: Question # 1 2 . Create a function called my _ product that computes the multiplication of the numbers in any vector using a while

Question #12. Create a function called my_product that computes the multiplication of the numbers in any vector using a while loop. The function should accept the vector as an input argument and return the product as an output argument. Create a script and test your function on the following vector:
[7-1113-1719-2329]
These numbers below are randomized. Each of the six sample runs has a different secret number. Your output will have a different secret number each time the script runs.
Command Window Output
Guess a number between 1 and 10: 5
You guessed 3 too low.
>>
Guess a number between 1 and 10: 5
You guessed 3 too high.
>>
Guess a number between 1 and 10: 4
You guessed 1 too low.
>>
Guess a number between 1 and 10: 6
You guessed 1 too high.
>>
Guess a number between 1 and 10: 5
You guessed 2 too low.
>>
Guess a number between 1 and 10: 8
Yes, 8 is the secret number.
>>

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 Programming Questions!