In [2]:
import coor
import pathlength
import kinematix

Classwork 02

Saktill

9/13/2016

We finished 2/3 problems completely, which are coor.py and pathlength.py. We then kept running into an unresolvable list problem for kinematix.py. We couldn't get the function to append to an empty list after taking a list as a parameter. But that was the only problem we seemed to encounter.

Below we show the output for coor.py. This module takes in 3 parameters which are an interval and a number of divisions of that interval. We show this by example by choosing the interval [0,1] with 4 divisions.


In [3]:
print coor.equalSpacedCoordinates(4,0,1)


[0.25, 0.5, 0.75, 1.0]

Now we show the output for pathlength.py. The function in this module takes in two lists as its parameters. Lists x and y can be thought of as the respective components of a certain vector.


In [4]:
x = [1,3]
y = [2,4]
print pathlength.pathlength(x,y)


7.2360679775

Kinematix.py

This is a module that includes a function which returns velocity and acceleration based on approximation formulas. Here's the return from a test function, which sets $x_i = V t_i$ for some constant $V$. In this instance, $V$ is 6.


In [6]:
print kinematix.test_kinematics()


((6.0, 0.0), (6.0000000000000036, 1.3322676295501878e-08))

INSTRUCTOR COMMENTS

Try to structure your notebooks to read as a more professional report. This is a very casual document. Write both your names in full at the top. Separate problems into distinct sections. Give a description of the problem. Show the solution, and make sure you save the notebook with the outputs that you want to show (you only have inputs here). Imagine that you are sending this document to a future employer, and it is showcasing your work as a stand-alone and self-contained document.