1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-12-22 03:38:13 +00:00

Added Example in Classes

This commit is contained in:
cif2cif 2016-02-23 17:10:18 +01:00
parent fdb3746c51
commit 034d3fe808

View File

@ -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": {},