{ "metadata": { "name": "", "signature": "sha256:d40864745b0958ff90d45e29ecc4874d2fd0d20b38ed09535ff46977537fd224" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter no. 1: Introduction To Electronics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.1 Page no.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "A=4 #NUMERICAL CODE FOR BAND YELLOW\n", "B=7 #NUMERICAL CODE FOR BAND VIOLET\n", "C=3 #NUMERICAL CODE FOR BAND ORANGE\n", "D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%\n", "\n", "#Resistor Value Calculation\n", "R=(A*10+B)*10**C\n", "#Tolerance Value Calulation\n", "T=D*R/100;\n", "R1=R-T;\n", "R2=R+T;\n", "\n", "# Results\n", "print \"Therefore thr resistance should be within the range \", R1*10**(-3) ,\"kohm\",\"and\", R2*10**(-3),\"kohm\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Therefore thr resistance should be within the range 44.65 kohm and 49.35 kohm\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.2 Page no.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "A=8 #NUMERICAL CODE FOR BAND GRAY\n", "B=6 #NUMERICAL CODE FOR BAND BLUE\n", "C=-1 #NUMERICAL CODE FOR BAND GOLD\n", "D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%\n", "#Resistor Value Calculation\n", "R=(A*10+B)*10**C\n", "#Tolerance Value Calulation\n", "T=D*R/100\n", "R1=R-T\n", "R2=R+T\n", "# Results \n", "print \"Range of Values of the Resistor is between \",R1,\"ohm\",\"and\",R2,\"ohm\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Range of Values of the Resistor is between 8.17 ohm and 9.03 ohm\n" ] } ], "prompt_number": 2 } ], "metadata": {} } ] }