diff options
author | Trupti Kini | 2016-11-25 23:30:54 +0600 |
---|---|---|
committer | Trupti Kini | 2016-11-25 23:30:54 +0600 |
commit | 251aecb3432f4efd990b2848563af88948e3ea4c (patch) | |
tree | cb8c6decedb86cf9ca3101cdabbbd24ce583d8c4 /f_by_df/1_An_overview_of_C.ipynb | |
parent | 3727ade10dd304eb7a596cac7adb00302953e402 (diff) | |
download | Python-Textbook-Companions-251aecb3432f4efd990b2848563af88948e3ea4c.tar.gz Python-Textbook-Companions-251aecb3432f4efd990b2848563af88948e3ea4c.tar.bz2 Python-Textbook-Companions-251aecb3432f4efd990b2848563af88948e3ea4c.zip |
Added(A)/Deleted(D) following books
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_kN6Dpid.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_tIlzIkR.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_PgrcCS3.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_eLqBEle.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_F25WLJ6.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Eijvt7y.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlhSgIB.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_YQ3b0EW.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_raABo34.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_52Xb53f.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_mk2HyQz.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter10_NUnB5Sw.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter11_pIim3x0.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter12_9A34qBU.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13_ZusP0LZ.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter14_HgYvpWb.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter15_o1Meb0U.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter16_xq1IcPx.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17_JAzeWmK.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter18_7Yy7cvJ.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter19_GQTZX04.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter1_seG0iD4.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20_7AIMdUg.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter21_ingIztX.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter22_yljf4OR.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter2_exrY10K.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter3_4zPOo0N.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter4_UHVlvXM.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter5_He9TCwH.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6_569mm1H.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter7_uRawaHX.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter8_KEcrcQP.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter9_2XNkqrL.ipynb
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/16.11_EVddapc.png
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/3.3_hWZB9rU.png
A Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/7.10_IDdNUer.png
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11_0YOsUSl.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12_hzQe7ah.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13_DuT5TXy.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14_3UXi8E3.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15_YmFtkbT.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16_NzhdF5v.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18_gAN9M3I.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19_d2Dk0b0.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20_oPoeIwV.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21_g3i9pmI.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22_kZ51MuY.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23_MeQwZwE.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2_9eBOyNb.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5_0stc93N.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6_Qjw2zj2.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8_1dOnAi7.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9_12ISo6t.ipynb
A Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1_SdzvQJK.png
A Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2_6vjSxZe.png
A Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3_vqn3sAt.png
A Problems_in_Electrical_Engineering_by_Parker_Smith/README.txt
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter10_QlnhZhy.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter11_0iM0C4n.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter12_KLDtsnD.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter13_PUt6mPw.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter14_1MNPptQ.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter15_xVW7XGn.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter16_au5Aji1.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter17_0ixqhLJ.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter18_jjgTIC5.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter19_Z3Jn476.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter1_nKyAwVf.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter2_jki9geU.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter3_9BtkYo4.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter4_KaWbXff.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter5_NTVaiVF.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter7_fElJXKG.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter8_P6SjSkH.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter9_5BJhRQ7.ipynb
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/11.4_upwwc7G.png
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/13.1_fg5oW41.png
A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/15.4_yoOlH2F.png
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter01.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter02.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter03.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter04.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter05.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter06.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter07.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter08.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter09.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter10.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter11.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter12.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter13.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter14.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter15.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter16.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter17.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter18.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter19.ipynb
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/15.8.png
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/4.3.png
A Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/9.6.png
A f_by_df/1_An_overview_of_C.ipynb
A f_by_df/screenshots/amit_Das.png
A f_by_df/screenshots/amit_Das_2s4uFcV.png
A f_by_df/screenshots/anshul_zMmwiWY.png
A sample_notebooks/RahulJoshi/Chapter_1_An_Overview_of_Heat_Trasnfer.ipynb
Diffstat (limited to 'f_by_df/1_An_overview_of_C.ipynb')
-rw-r--r-- | f_by_df/1_An_overview_of_C.ipynb | 254 |
1 files changed, 254 insertions, 0 deletions
diff --git a/f_by_df/1_An_overview_of_C.ipynb b/f_by_df/1_An_overview_of_C.ipynb new file mode 100644 index 00000000..ecf52ddd --- /dev/null +++ b/f_by_df/1_An_overview_of_C.ipynb @@ -0,0 +1,254 @@ +{ + "metadata": { + "name": "1 An overview of C++" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number: 14#\\n#This program outputs a string, two integer values, and a double floating-point value. #\ni=10\nj=20\nd=99.101\nprint ('Here are some values : %d %d %2.3f'%(i,j,d))\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Here are some values : 10 20 99.101\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number: 16#\n\n#Variable declaration\ni=100\n\n#Result\nprint('Enter a value: 100')\nprint 'Here\\'s your number: ',i\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter a value: 100\nHere's your number: 100\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 , Page Number 16#\n\n#Variable declaration\ni=10\nf=100.12\ns='Hello World'\n\n#Result\nprint 'Enter an integer,float and string: ',i,f,s\nprint 'Here\\'s your data: ',i,f,s \n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": " Enter an integer,float and string: 10 100.12 Hello World\nHere's your data: 10 100.12 Hello World\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 5 , Page Number 17#\n\n#Variable declaration\nch='X'\n\n#Result\nprint 'Enter keys,X to stop.'\n\n#while loop\nwhile ch!='X':\n if(ch!='X'): \n print ': ',ch\n else:\n break", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter keys,X to stop.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 19#\n\n#Variable declaration\na=199\n\nprint 'Enter number to be tested: ',a\n#if loop\nif a % 2 == 0:\n#Result\n print 'Number is even'\nelse:\n print 'Number is odd'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number to be tested: 199\nNumber is odd\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 ,Page Number 25#\n\n#class declaration\nclass Myclass():\n def __init__(self,c,d):\n self.a = c\n self.b = d\nobj = Myclass(10,99)\nobj.a,obj.b\n\n#Result\nprint obj.a\nprint obj.b", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "10\n99\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 , Page Number 30#\n\n#DefiningFunction\ndef sum(a,b):\n return a+b\na=10\nb=40\n\n#Result\nprint 'Enter two numbers: ',a,b\nprint 'Sum is: ',sum(a,b)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 10 40\nSum is: 50\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number 31#\n\n#Variable declaration\ni=5\nprint 'Enter number: ',i\nfact=1\nfor j in range(i):\n fact = fact * (j+1)\n \n#Result\nprint 'Factorial is ',fact\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number: 5\nFactorial is 120\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 ,Page Number 32#\n\noutcome = 'false'\n\n#if loop\nif(outcome):\n print 'true'\nelse:\n print 'false'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "true\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 ,Page Number 36#\n\n#Defining function\ndef get_date(day=None, month=None, year=None, as_string=None):\n\tif as_string:\n\t\tprint 'Date:', as_string\n\telse:\n\t\tif not (day and month and year):\n\t\t\traise Exception(\"Invalid Date arguments\")\n\t\tprint \"Date : %d/%d/%d\" % (month, day, year)\n\n\nif __name__ == '__main__':\n\tget_date(as_string=\"3/12/2013\")\n\tget_date(day=12, month=3, year=2013)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Date: 3/12/2013\nDate : 3/12/2013\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.3 Q3 , Page Number 18#\n\n#Variable declaration\na=4\nb=8\nd=2\nprint 'Enter two numbers: ',a,b\nif a>b:\n min=b\nelse:\n min=a\nfor d in range(d,min):\n if a % d == 0 and b % d == 0: \n break\nif d == min:\n print 'No common denominators ' \nelse:\n print 'The lowest common denominator is ',d\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 4 8\nThe lowest common denominator is 2\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 34#\n\nprint 'Absolute value of -10: ',abs(-10)\nprint 'Absolute value of -10L: ',abs(-10L)\nprint 'Absolute value of -10.01: ',abs(-10.01)\n\n#Defining function\ndef abs(n):\n print 'In integer abs() '\n \n\ndef abs(n):\n print 'In longs abs() '\n\ndef abs(n):\n print 'In double abs() '\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Absolute value of -10: 10\nAbsolute value of -10L: 10\nAbsolute value of -10.01: 10.01\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Excercise 1 , Page Number 18#\n\n#Variable declaration\nhours=3\nwage=2000\n\n#Result\nprint 'Enter hours worked: ',hours\n\nprint 'Enter wage per hour: ',wage\nprint 'Pay is: $',wage*hours", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter hours worked: 3\nEnter wage per hour: 2000\nPay is: $ 6000\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 2 , Page Number 18#\n\n#Variable declaration\nfeet = 5.0\n\n#If loop\nif(feet == 0.0):\n print 'Wrong inpt.'\nelse:\n print 'Enter feet :',feet\n #Result\n print feet*12,'inches'\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter feet : 5.0\n60.0 inches\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.7 Q1 , Page Number 38#\n\nimport math\n\n#Result\nprint 'Square root of 90.34 is : ',math.sqrt(90.34)\nprint 'Square root of 90L is: ',math.sqrt(90L)\nprint 'Square root of 90 is: ',math.sqrt(90)\n\n#Defining functions\ndef sqrt(n):\n print 'computing integer root '\n \n\ndef sqrt(n):\n print 'computing long root '\n\ndef sqrt(n):\n print 'computing double root '", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Square root of 90.34 is : 9.50473566176\nSquare root of 90L is: 9.48683298051\nSquare root of 90 is: 9.48683298051\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Example 3 , Page Number 36#\n\n#Defining functions\ndef f1(a=None,b=None,c=None):\n if a:\n print 'In f1',(a)\n else:\n if not (b and c):\n raise Exception(\"Invalid arguments\")\n print 'In f1',(b,c)\nif __name__ == '__main__':\n\tf1(a=10)\n\tf1(b=10, c=20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "In f1 10\nIn f1 (10, 20)\n" + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |