Two Bad Readings

Data with PythonMedium+20 XP+20

Two Bad Readings

A weather station logs one temperature per hour. Two of today's readings are faulty: a spike of 99 at position 2, and a dropout of 0 at position 3. An analyst makes two backups, then repairs the readings through two slices — one for the morning hours, one for midday:

One fact you'll need, which the chapter only mentioned in passing when it called reshape "a new view of the same values": a slice of an array is a view too. It is a window onto part of the original array, with no numbers of its own, so assigning to a position in the slice changes the original array. .copy() is different: it builds a separate array with its own numbers.

What do the two print lines show?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.