- numpy - matplotlib Physim

The Dot Product

In this section you will practice and apply what you have learned from the Dot Product simulations, creating a calculator to calculate the dot product of two vectors given a user input of vector components of each of the vectors and understanding the calculations being done.


If you are looking for a reference for Python consider looking at the Python Reference Sheet on the site.



Below are sample runs of some of the outputs you should get when running the program.


The Dot Product


For user input vector 1 = (3.4, 5.6, 9.3) and vector 2 = (7.6, 0.4, 3.2), the output should be:


For user input vector 1 = (9.5, 1.3, 2.4) and vector 2 = (5.3, 4.1, 8.6), the output should be:


For user input vector 1 = (-11.5, -6.9, 7.0) and vector 2 = (5.4, -3.3, -12.7), the output should be:


For user input vector 1 = (-7.2, -1.4, -8.8) and vector 2 = (-2.6, -9.7, -3.3), the output should be:


For user input vector 1 = (0.0, -13.2, 3.7) and vector 2 = (9.3, -4.5, 21.4), the output should be:



Here is a code editor so that you can compute your calculator program.


# insert your code here


Go Back to Vector Exercises Page