summaryrefslogtreecommitdiff
path: root/sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:40:35 +0530
committerkinitrupti2017-05-12 18:40:35 +0530
commitd36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch)
tree9806b0d68a708d2cfc4efc8ae3751423c56b7721 /sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb
parent1b1bb67e9ea912be5c8591523c8b328766e3680f (diff)
downloadPython-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz
Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2
Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip
Revised list of TBCs
Diffstat (limited to 'sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb')
-rwxr-xr-xsample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb111
1 files changed, 111 insertions, 0 deletions
diff --git a/sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb b/sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb
new file mode 100755
index 00000000..13a30876
--- /dev/null
+++ b/sample_notebooks/DanishAnsari/DanishAnsari_version_backup/chapter_1.ipynb
@@ -0,0 +1,111 @@
+{
+ "metadata": {
+ "name": "chapter 1.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Vectors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1-1,Page no 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initialisation of Variables\n",
+ "f1=120 #lb\n",
+ "f2=100 #lb\n",
+ "theta=((60*pi)/180) #radians\n",
+ "#Calculations\n",
+ "R=sqrt(120**2+100**2-(2*120*100*cos(theta))) #Applying Thr rule of Cosines\n",
+ "alpha1=(((arcsin(120*sin(theta)/111))*180)/pi) #Applying the Law of Sines\n",
+ "alpha=alpha1+270 #As the vector lies in the fourth Quadrant by obsrevaton\n",
+ "#Results\n",
+ "print'The Resultant of The force system is equal to',round(R,3),\"lb\" #lb\n",
+ "print'The Resultant is at',round(alpha,3),\"degrees\" #degrees\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Resultant of The force system is equal to 111.355 lb\n",
+ "The Resultant is at 339.43 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2-2,Page no 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Initilization of variables\n",
+ "P=100 #lb\n",
+ "Q=120 #lb\n",
+ "theta=((30*pi)/180) #radians\n",
+ "#Calculations\n",
+ "R_x=Q*cos(theta) #lb\n",
+ "R_y=Q*sin(theta)-P #lb\n",
+ "R=sqrt(R_x**2+R_y**2) #lb Triangle law\n",
+ "Theta_1=((arctan(R_y/R_x))*180)/pi #degrees\n",
+ "Theta_R=360+Theta_1 #degrees\n",
+ "#Result\n",
+ "print'The resultant of the force system is',round(R,3),\"lb\"\n",
+ "print'The resultant is at',round(Theta_R,3),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant of the force system is 111.355 lb\n",
+ "The resultant is at 338.948 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file