diff options
author | hardythe1 | 2015-05-05 14:21:39 +0530 |
---|---|---|
committer | hardythe1 | 2015-05-05 14:21:39 +0530 |
commit | fba055ce5aa0955e22bac2413c33493b10ae6532 (patch) | |
tree | be70ef4fccd07c9c88de778014219201b4ea971f /sample_notebooks/AkshayShende/chapter2.ipynb | |
parent | 67068710030ddd6b6c809518c34af2e04e0bf7ca (diff) | |
download | Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.gz Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.tar.bz2 Python-Textbook-Companions-fba055ce5aa0955e22bac2413c33493b10ae6532.zip |
add books
Diffstat (limited to 'sample_notebooks/AkshayShende/chapter2.ipynb')
-rwxr-xr-x | sample_notebooks/AkshayShende/chapter2.ipynb | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sample_notebooks/AkshayShende/chapter2.ipynb b/sample_notebooks/AkshayShende/chapter2.ipynb new file mode 100755 index 00000000..d82b3395 --- /dev/null +++ b/sample_notebooks/AkshayShende/chapter2.ipynb @@ -0,0 +1,65 @@ +{
+ "metadata": {
+ "name": "chapter2.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Concurrent Forces in A Plane"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-1, Page No:10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=50 #N\n",
+ "Q=100 #N\n",
+ "beta=150 #degree # angle between P & the horizontal\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=(P**2+Q**2-(2*P*Q*cos(beta*(pi/180))))**0.5 # using the Trignometric solution\n",
+ "Alpha=(arcsin(((sin(beta*(pi/180))*Q)/R)))*(180/pi)+15 #Angle in degrees\n",
+ "\n",
+ "#Result\n",
+ "print \"The magnitude of resultant is\",round(R,2),\"N\"\n",
+ "print \"The direction of resultant is\",round(Alpha,2),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of resultant is 145.47 N\n",
+ "The direction of resultant is 35.1 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |