Question

What will this line of code do?

numpy.sum(item_prices)

(1 point)
Responses

create a variable called item_prices to hold the sum

create a variable called item_prices to hold the sum

add together the values in an array called item_prices

add together the values in an array called item_prices

add the variable sum to the array called item_prices

add the variable sum to the array called item_prices

add the variable item_prices to the sum

add the variable item_prices to the sum
Skip to navigation

1 answer

The correct response is:

add together the values in an array called item_prices

This line of code uses the numpy.sum() function to calculate the total sum of all elements in the item_prices array.

Similar Questions
  1. QuestionWhat will this line of code do? numpy.sum(item_prices) (1 point) Responses create a variable called item_prices to hold
    1. answers icon 1 answer
  2. What will this line of code do?numpy.sum(item_prices) (1 point) Responses create a variable called item_prices to hold the sum
    1. answers icon 1 answer
  3. What will this line of code do? numpy.sum(item_prices)create a variable called item prices to hold the sum add together the
    1. answers icon 1 answer
  4. QuestionWhat will this line of code do? numpy.average(quiz_scores) (1 point) Responses create a variable called quiz_scores to
    1. answers icon 1 answer
more similar questions