diff --git a/python/1_8_Classes.ipynb b/python/1_8_Classes.ipynb index 7f2b53f..07c0377 100644 --- a/python/1_8_Classes.ipynb +++ b/python/1_8_Classes.ipynb @@ -46,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { "collapsed": false }, @@ -67,11 +67,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "<__main__.TV_Set object at 0x7fec69171860> off\n" + ] + }, + { + "data": { + "text/plain": [ + "__main__.TV_Set" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "#Example object instantiation\n", "\n", @@ -80,6 +98,27 @@ "type(my_tv)" ] }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Samsung on\n" + ] + } + ], + "source": [ + "# Call on method\n", + "my_tv.on()\n", + "print(my_tv.name, my_tv.status)" + ] + }, { "cell_type": "markdown", "metadata": {},