Hi, according to your description you need the code that represents the statement I will use C++ language to describe the code.
// Example program
#include <iostream>
int main()
{
int a [5] = [1,2,3,4,5];
int j = 0;
return 0;
}
Explanation:
In this language you must have to declare in the header the <em>libraries</em> that you include in your main program, after that a function <em>main</em> where your put your<em> logical algorithm</em> in fact, you declare the algorithm that you need. In this case declare a variable and assign an <em>array</em> of <em>5 positions</em> and a j variable and assign a number between 0 and 3.
A method in python is somewhat similarto a function, except it is associated with object/classes. Methods in python are very similar to functions except for two major differences. The method is implicitly used for an object for which it is called. The method is accessible to data that is contained within the class.