summaryrefslogtreecommitdiff
path: root/Mastering_C/chapter1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Mastering_C/chapter1.ipynb')
-rw-r--r--Mastering_C/chapter1.ipynb170
1 files changed, 170 insertions, 0 deletions
diff --git a/Mastering_C/chapter1.ipynb b/Mastering_C/chapter1.ipynb
new file mode 100644
index 00000000..b1a0ed0e
--- /dev/null
+++ b/Mastering_C/chapter1.ipynb
@@ -0,0 +1,170 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f3ff9d889b7b7951c347d942d053d9fde4d57e52c21d53b779e2930b738a9f69"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Introduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Hello World\"\n",
+ "print \"Bye.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hello World\n",
+ "Bye\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Print \"Hello World\"\n",
+ "#This program will give error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SyntaxError",
+ "evalue": "invalid syntax (<ipython-input-2-9028d474ee90>, line 1)",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[1;36m File \u001b[1;32m\"<ipython-input-2-9028d474ee90>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m Print \"Hello World\"\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Hello World\"\n",
+ "print \"Bye.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hello World\n",
+ "Bye.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Hello World\";print \"Bye.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hello World\n",
+ "Bye.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"\\\n",
+ " Hello World\"\n",
+ "\n",
+ "print \"\\\n",
+ " Bye.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Hello World\n",
+ " Bye.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file