Drills tagged with this skill, unpassed first. Pass them all to mark the skill ready for scenarios.
celsius_to_fahrenheit(celsius) that takes a list of Celsius numbers and returns a NumPy array of the matching Fahrenheit values. Formula: F = C * 9/5 + 32.
Example. [0, 100] → array([32., 212.]).
Notes. Use NumPy broadcasting — no for-loops. Empty input → empty array.row_sums(matrix) that takes a 2D list (list of lists) and returns a NumPy array with one entry per row — the sum of that row.
Example. [[1,2,3],[4,5,6]] → array([6, 15]).
Notes. Use .sum() with the right axis argument. Rows with negative values still sum normally (no special-casing). A single-row input still returns a 1-element array.pick_columns(matrix, cols) that takes a 2D list and a list of column indices, and returns a NumPy array with just those columns, in the order given.
Example. matrix=[[1,2,3],[4,5,6]], cols=[0,2] → array([[1, 3], [4, 6]]).
Notes. cols=[2,0] returns columns in that swapped order, not sorted. cols=[] returns a 2D array with 0 columns (one empty row per input row).