Physics homework

--Originally published at Hackerman's house

For this project I worked with Jona Cabrera who is also in my physics class. The teacher’s assignment was to create a programm that could solve a vectors addition.

The specific problem included three vectors, and the program should be able to add it and obtain the magnitude of the final vector, as well as the components in x and y, finally the program had to obtain the angle of the final vector in reference of the x-axis.

quezada

To create this program we had to import the math library. This allowed us to work with angles, use Pi and also use square root. The program is really simple, is basically ask the user for the data that will be replaced in formulas that we already know.  The only tricky part was the angles, due python works with radians and we use degrees, but this was solved transforming the input data to radians and transforming the result given by the computer to degrees.

This is how it works.

quezada-result

Check out the blog of my partner Jona Cabrera. http://turtlingturtlousturtle.tumblr.com/

giphy-6