summaryrefslogtreecommitdiff
path: root/Let_us_C/chapter-5.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Let_us_C/chapter-5.ipynb')
-rw-r--r--Let_us_C/chapter-5.ipynb27
1 files changed, 0 insertions, 27 deletions
diff --git a/Let_us_C/chapter-5.ipynb b/Let_us_C/chapter-5.ipynb
index 62f0970a..76227dd0 100644
--- a/Let_us_C/chapter-5.ipynb
+++ b/Let_us_C/chapter-5.ipynb
@@ -25,7 +25,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate a simple function'''\n",
"\n",
"# function definition\n",
"def message():\n",
@@ -59,7 +58,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate a call to more than one function'''\n",
"\n",
"# function definitions\n",
"def italy():\n",
@@ -105,7 +103,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate a call to more than one function'''\n",
"\n",
"# function definitions\n",
"def argentina():\n",
@@ -154,7 +151,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate sending and receiving values between functions'''\n",
"\n",
"# function definition\n",
"def calsum ( x, y, z ):\n",
@@ -201,10 +197,8 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate that there is no restriction on the number of return\n",
"statements that may be present in a function.\n",
"Also, the return statement need not always be present at the end of the called\n",
- "function.'''\n",
"\n",
"# function definition\n",
"def fun():\n",
@@ -240,9 +234,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate that If the value of a formal argument is\n",
"changed in the called function, the corresponding\n",
- "change does not take place in the calling function.'''\n",
"\n",
"# function definition\n",
"def fun(b):\n",
@@ -278,7 +270,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate Scope Rule of Functions'''\n",
"\n",
"# function definition\n",
"def display(j):\n",
@@ -314,7 +305,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to find out square of a number using a function.'''\n",
"\n",
"# function definition\n",
"def square(x):\n",
@@ -358,8 +348,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to demonstrate a called function without returning any value using\n",
- "the keyword void.'''\n",
"\n",
"# function definition\n",
"def gospel(): # void function\n",
@@ -397,7 +385,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to print the address of a variable'''\n",
"\n",
"#Variable declaration\n",
"i = 3\n",
@@ -431,8 +418,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program that demonstrates the relationships between pointers , variables\n",
- "and addresses'''\n",
"\n",
"#Variable declaration\n",
"i = 3 \n",
@@ -477,8 +462,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program that demonstrates a pointer that\n",
- "points to another pointer'''\n",
"\n",
"#Variable declaration\n",
"i = 3\n",
@@ -534,7 +517,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate the \u2018Call by Value\u2019 method of passing arguments'''\n",
"\n",
"# function definition\n",
"def swapv (x,y):\n",
@@ -575,7 +557,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate the \u2018Call by Reference\u2019 method of passing arguments'''\n",
"\n",
"# function definition\n",
"def swapv (a,b):\n",
@@ -615,8 +596,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate how to use a call by reference to make a function\n",
- "return more than one value at a time, which is not possible ordinarily.'''\n",
"\n",
"#Input from user\n",
"#radius = raw_input(\"Enter radius of a circle: \" )\n",
@@ -664,8 +643,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to demonstrate a non-recursive function for calculating\n",
- "the factorial value of an integer'''\n",
"\n",
"# function definition\n",
"def factorial(x):\n",
@@ -711,8 +688,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to demonstrate a the recursive version of\n",
- "the function to calculate the factorial value.'''\n",
"\n",
"# function definition\n",
"def rec(x):\n",
@@ -759,8 +734,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate the use of a stack for\n",
- "implementing function calls'''\n",
"\n",
"#Variable declaration\n",
"a = 5\n",