summaryrefslogtreecommitdiff
path: root/C++_from_the_Ground/Chapter_7(1).ipynb
diff options
context:
space:
mode:
authordebashisdeb2014-06-21 00:52:25 +0530
committerdebashisdeb2014-06-21 00:52:25 +0530
commit7c756fcc12d21693818e58f6936cab5b7c112868 (patch)
tree009cb02ec85f4a75ac7b64239751f15361df2bfe /C++_from_the_Ground/Chapter_7(1).ipynb
parent83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (diff)
downloadPython-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.gz
Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.tar.bz2
Python-Textbook-Companions-7c756fcc12d21693818e58f6936cab5b7c112868.zip
Removed Problem Statements Completely
Diffstat (limited to 'C++_from_the_Ground/Chapter_7(1).ipynb')
-rw-r--r--C++_from_the_Ground/Chapter_7(1).ipynb37
1 files changed, 11 insertions, 26 deletions
diff --git a/C++_from_the_Ground/Chapter_7(1).ipynb b/C++_from_the_Ground/Chapter_7(1).ipynb
index 28829c6d..027b30f5 100644
--- a/C++_from_the_Ground/Chapter_7(1).ipynb
+++ b/C++_from_the_Ground/Chapter_7(1).ipynb
@@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
- "signature": "sha256:9a6978851f88c0c91bde88465299d72777f3dae7854964b1cadad7b80092df72"
+ "signature": "sha256:ab47bb393809bc88589e7e92320813b90077813594dc417229af49780e24b53b"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -254,8 +254,7 @@
"input": [
"\n",
"from ctypes import *\n",
- "\n",
- "#Function to change the reference value\n",
+ " \n",
"def f(j):\n",
" j[0]=100 #j is assigned 100\n",
"\n",
@@ -295,7 +294,7 @@
"\n",
"from ctypes import *\n",
"\n",
- "#Function to change the reference value\n",
+ " \n",
"def f(j):\n",
" j[0]=100 #j is assigned 100\n",
"\n",
@@ -332,8 +331,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "#function to print some nos.\n",
+ " \n",
"def display(num):\n",
" for i in range(10):\n",
" print num[i],\n",
@@ -370,9 +368,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#Print some nos.\n",
+ " \n",
"def display(num):\n",
" print num,\n",
"\n",
@@ -410,9 +406,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#Function to convert into cubes\n",
+ " \n",
"def cube(n,num):\n",
" num-=1\n",
" while num:\n",
@@ -502,8 +496,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "#Function to fond length\n",
+ " \n",
"def mystrlen(str):\n",
" l=len(str)\n",
" return l\n",
@@ -572,7 +565,6 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''The program prints all command line arguments '''\n",
"import sys\n",
"\n",
"#Result\n",
@@ -721,9 +713,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#Return index of substring or -1 if not found.\n",
+ " \n",
"def find_substr(sub,str):\n",
" l=str.find(sub)\n",
" return l\n",
@@ -794,8 +784,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "#Return position of substring\n",
+ " \n",
"def find_substr(sub,str):\n",
" return str.find(sub)\n",
"\n",
@@ -831,9 +820,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#Recursive version\n",
+ " \n",
"def factr(n):\n",
" if n==1:\n",
" return 1\n",
@@ -880,9 +867,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#Reversing a string\n",
+ " \n",
"def reverse(s):\n",
" r = \"\"\n",
" for c in s:\n",