seriesTwo

In this problem, you're practicing creating a list and adding specific elements to it that are generated using a loop. (Combining your knowledge of iteration and lists)

Complete the method that returns the sequence below from 1 to n where n >= 1;

seriesTwo(1) -> [1]
seriesTwo(2) -> [1, 3]
seriesTwo(3) -> [1, 3, 7]
seriesTwo(4) -> [1, 3, 7, 13]

How can you use a loop to generate the values for the elements? How does the value update each iteration to get to generate the value of the next element?

The following are methods of a list that can be used to manipulate the contained data.

Type your solution        
Skills Practiced:
3.C
3.D
4.A
4.B
Copyright © StudyCS 2024 All rights reserved.