Skip to content
C

Problem 2: Dot Product Calculator

Easypython

Problem Description

Write a Python program using NumPy that calculates and prints the dot product of two given vectors of equal length.

Input

Two vectors of equal length.

Output

The calculated dot product (a single number).

Constraints

  • Both vectors must have the same number of elements.

Example Input

text
vector_a = [2, 3, 4], vector_b = [1, 0, 5]

Example Output

text
Dot Product: 22

Concepts Covered

np.dot(), vector operations.

Input (stdin)

Output

Run your code to see output here...