summaryrefslogtreecommitdiff
path: root/Practical_C_Programming_by_Steve_Oualline/Chapter_23_1.ipynb
blob: bde77ef65d24b1c3e1e9ac08866fc8bfa94017c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
 "metadata": {
  "name": "",
  "signature": "sha256:456077e76cba45d73549d009e1de5e86e8fe318cfd47c138325bf27f45638790"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 23: Programming adages"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 23.1, Page number: 447"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variable declaration\n",
      "number = 2\n",
      "\n",
      "# Calculation and result\n",
      "if (number != 2) :\n",
      "   print ('Number is not two\\n')\n",
      "else :\n",
      "   print ('Number is two\\n')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number is two\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}