summaryrefslogtreecommitdiff
path: root/C++_from_the_Ground/Chapter_2(1).ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'C++_from_the_Ground/Chapter_2(1).ipynb')
-rw-r--r--C++_from_the_Ground/Chapter_2(1).ipynb32
1 files changed, 8 insertions, 24 deletions
diff --git a/C++_from_the_Ground/Chapter_2(1).ipynb b/C++_from_the_Ground/Chapter_2(1).ipynb
index 603f2bab..b3976867 100644
--- a/C++_from_the_Ground/Chapter_2(1).ipynb
+++ b/C++_from_the_Ground/Chapter_2(1).ipynb
@@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
- "signature": "sha256:2822ffa73df44943f6be3bedb4cf89d60d9228e7b719790e40dca7bc4236f0b9"
+ "signature": "sha256:05876b24f412fcea817693bad944dc90f3dae4fb5142aeb7d9c2c98569067083"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -27,7 +27,6 @@
"collapsed": false,
"input": [
"\n",
- "#Result\n",
"print \"This is my first C++ program.\""
],
"language": "python",
@@ -54,10 +53,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'\n",
- "\n",
- "\n",
- "#Variable Declaration\n",
+ " \n",
"x=None \n",
"\n",
"x=1023 #this assigns 1023 to x\n",
@@ -160,10 +156,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "\n",
- "#myfunc's definition\n",
+ " \n",
"def myfunc():\n",
" print \"Inside myfunc() \"\n",
" \n",
@@ -197,10 +190,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "\n",
- "#Result\n",
+ " \n",
"print abs(-10)"
],
"language": "python",
@@ -227,9 +217,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#mul's definition\n",
+ " \n",
"def mul(x,y):\n",
" print x*y,\n",
"\n",
@@ -262,9 +250,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "\n",
- "#mul()'s definition; this function returns a value\n",
+ " \n",
"def mul(x,y):\n",
" return x*y #return product of x and y\n",
"\n",
@@ -330,8 +316,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "'''This program illustrates the if statement'''\n",
- "\n",
+ " \n",
"#Variable declaration\n",
"a=10 #user input for two numbers\n",
"b=20\n",
@@ -393,8 +378,7 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
- "#Variable declaration\n",
+ " \n",
"a=10 #User input for two numbers\n",
"b=20\n",
"\n",