Physics Project

--Originally published at Hackerman's house

Hey guys, I wanted to sshare a really interesting project that I did for the Physics class with the teacher Juan Quezada. The project was to create a program that could add vectors, not an arranged amount of vectors but the amount the user wanted to.

To do this I had to use the for loop, which would get the data of each vector, the loop would repeat as many times as the user wanted to. The data of the vectors was then added to a list, the list contain the data deppending on the type of data that was obtained trough the procedure.

Here is the code.

vectores

Here is how it works.

vectores-2

Thank you for your attention.


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