Nesteed For Loop Function

Please let me know if you know how to use these inputs to create the following output


      n = 3
      range 1 = [12508, 9969, 310595, 57409]
      range 2 = [100, 200, 300]


     [[12608, 10069, 310695, 57509],
      [12808, 10269, 310895, 57709],
      [13108, 10569, 311195, 58009]]
1 Like

what’s the logic behind it?
what does connect that input with that output?
it is essential information for making any algorithm, any function

1 Like

The basic idea is N is the length of range 2.
Add each number from range 2 to range 1.

1 Like

Ideally this will work out to three rows.
The first row is adding the first number in range 2 to each of the numbers in range 1.
The second row is adding the second number in range 2 to each number in range 1.
The third row is adding the third number in range 2 to each number in range 1.

For the length of range 2 add each number to range 1.

1 Like

What have you tried so far? We won’t write code for people, but we can help you as you write code for yourself.

1 Like

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

1 Like

Hello, I appreciate the explanations.

To provide further insight - this is a particular function for the Stepik course “Intro to Programming in Python.”

I have repeatedly tried to code this on my own for some time now.

Below is a link to a repl I have coded on my own:

I am able to print grids of the two inputs, but it’s getting them to properly combine in python.