Question: Create a modular program on scratch that asks the user to enter two positive integers X and Y . Then the program generates a list

Create a modular program on scratch that asks the user to enter two positive integers X and Y. Then the program generates a list of X random positive integers where each integer is between 1 and Y. After the list is created, the program asks the user to enter another number Z and then the program uses the serial search algorithm to find if there is a number in the list so that Z times the number in the list equals Y. The output from the program should tell the user if there is such a number in the list, what the number is, and its index position in the list or tells the user that no such number exists.
For example, suppose the user enters X=10, Y=100 and the program generates the following list of random positive integers. If the user enters Z=20/3, the program searches for 15(Z*15=100) and the program should tell the user that the number 15 was found in the list in index position 6. If the user enters Z=80, the program should tell the user that there is no number in the list so that 80 times the number equals 100(the value of Y).This is an example only of what the program should produce. The result depends on inputs from the user.

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!