Question: Consider the sequence: 4 , 2 4 , 2 6 , 1 5 6 , 1 5 8 , 9 4 8 , 9 5
Consider the sequence:
Create a scratch program that asks the user to enter a positive number X Then the program displays all of the numbers in the above sequence from the first number up to the number in position X
For example, if the user enters the program displays the first six numbers in the sequence:
Hints and Notes:
Start by figuring out the pattern used to create the sequence.
Use a counter variable to count from position up to position X
The input X is a position number in the sequence, not an actual number in the sequence. For example, X means the number in the sequence in fourth position in the sequence in this case
The program outputs all of the numbers in the sequence starting a position and ending at position X
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
