QuestionQ6

VerifiedPython Basics for Data Analysis

You are creating a temperature-control module for a laboratory incubator. Your goals are to:

  • generate timestamps every 10 minutes across a 3-hour period (that is, 0 to 180 minutes), and
  • simulate five evenly spaced target temperatures from 35.0°C to 37.0°C for system calibration.

Which NumPy code snippet correctly generates both sequences? Select the best answer.

Explanation

np.arange(0, 181, 10) generates 10-minute timestamps from 0 through 180 because the stop value is exclusive. np.linspace(35.0, 37.0, 5) generates five evenly spaced temperature values, including both endpoints.

Community Discussion

No comments yet. Be the first to start the discussion!