Get One Dimensional Array Using Slice and Only Positive Indexes
Let's examine the syntax of slicing: array[start:end:step], where:
startis the index from which the slicing begins;endis the index at which the slicing concludes (note that this index is not included);stepis the parameter that specifies the intervals between the indices.
Oppgave
Swipe to start coding
Consider the following array: [11, 5, 87, 1, 44, 11, 6, 0, -5].
You need to obtain the following array: [87, 11, -5].
Use a slice with ONLY NON-NEGATIVE start, end, and step values.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 7
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 4.76
Get One Dimensional Array Using Slice and Only Positive Indexes
Sveip for å vise menyen
Let's examine the syntax of slicing: array[start:end:step], where:
startis the index from which the slicing begins;endis the index at which the slicing concludes (note that this index is not included);stepis the parameter that specifies the intervals between the indices.
Oppgave
Swipe to start coding
Consider the following array: [11, 5, 87, 1, 44, 11, 6, 0, -5].
You need to obtain the following array: [87, 11, -5].
Use a slice with ONLY NON-NEGATIVE start, end, and step values.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 7
single