summaryrefslogtreecommitdiff
path: root/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-09-04 22:04:10 +0530
committerThomas Stephen Lee2015-09-04 22:04:10 +0530
commit41f1f72e9502f5c3de6ca16b303803dfcf1df594 (patch)
treef4bf726a3e3ce5d7d9ee3781cbacfe3116115a2c /Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb
parent9c9779ba21b9bedde88e1e8216f9e3b4f8650b0e (diff)
downloadPython-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.gz
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.bz2
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.zip
add/remove/update books
Diffstat (limited to 'Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb')
-rwxr-xr-xFundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb109
1 files changed, 0 insertions, 109 deletions
diff --git a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb b/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb
deleted file mode 100755
index 11735b92..00000000
--- a/Fundamental_of_Computing_and_Programming_in_C/Chapter09.ipynb
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:1a0147da7a94fc5ebe7c66bbf21a563cb0bee33c1452a7bcfcbc21f5395d7aab"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 09 : Parameter Passing Methods"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example: 1, Page No.: 5.63"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Call By Value\n",
- "\n",
- "def cube(x):\n",
- " x=x*x*x\n",
- " return(x)\n",
- "\n",
- "n=5\n",
- "print \"Cube of %d is\"%n,cube(n)\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Cube of 5 is 125\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example: 2, Page No.:5.64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#Call by reference\n",
- "\n",
- "def interchange(a,b):\n",
- " t=0\n",
- " t=a\n",
- " a=b\n",
- " b=t\n",
- " return b,a\n",
- "\n",
- " \n",
- "i=5\n",
- "j=10\n",
- "print \"i and j values before interchange:\", i, j\n",
- "\n",
- "i=10\n",
- "j=5\n",
- "interchange(i,j)\n",
- "\n",
- "#Result\n",
- "print \"i and j values after interchange:\",i,j\n",
- "\n",
- "print \"i and j avalues after interchange in the function : %d %d \\n\"%interchange(i,j)\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "i and j values before interchange: 5 10\n",
- "i and j values after interchange: 10 5\n",
- "i and j avalues after interchange in the function : 10 5 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 2
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file