From e03b99a41401a68e1cb12845ec44ee903da0d6af Mon Sep 17 00:00:00 2001 From: kakaru Date: Sun, 18 Feb 2018 20:38:39 +0900 Subject: [PATCH] assessment test1 --- .gitignore | 137 ++++++ ...tructures Assessment Test-checkpoint.ipynb | 428 ++++++++++++++++-- ... and Data Structures Assessment Test.ipynb | 428 ++++++++++++++++-- 3 files changed, 907 insertions(+), 86 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..0a8b64611 --- /dev/null +++ b/.gitignore @@ -0,0 +1,137 @@ +# Created by https://www.gitignore.io/api/macos,python,jupyternotebook + +### JupyterNotebook ### +.ipynb_checkpoints +*/.ipynb_checkpoints/* + +# Remove previous ipynb_checkpoints +# git rm -r .ipynb_checkpoints/ +# +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +.pytest_cache/ +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule.* + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + + +# End of https://www.gitignore.io/api/macos,python,jupyternotebook \ No newline at end of file diff --git a/00-Python Object and Data Structure Basics/.ipynb_checkpoints/09-Objects and Data Structures Assessment Test-checkpoint.ipynb b/00-Python Object and Data Structure Basics/.ipynb_checkpoints/09-Objects and Data Structures Assessment Test-checkpoint.ipynb index 149e61af2..af010f975 100644 --- a/00-Python Object and Data Structure Basics/.ipynb_checkpoints/09-Objects and Data Structures Assessment Test-checkpoint.ipynb +++ b/00-Python Object and Data Structure Basics/.ipynb_checkpoints/09-Objects and Data Structures Assessment Test-checkpoint.ipynb @@ -31,15 +31,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Numbers:\n", + "Numbers: data type on number\n", "\n", - "Strings:\n", + "Strings: \n", "\n", - "Lists:\n", + "Lists: \n", "\n", - "Tuples:\n", + "Tuples: like const\n", "\n", - "Dictionaries:\n" + "Dictionaries: \n" ] }, { @@ -56,7 +56,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [] }, @@ -75,10 +77,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "#1. 44\n", + "#2. 29\n", + "#3. 34" + ] }, { "cell_type": "markdown", @@ -87,6 +93,37 @@ "What is the *type* of the result of the expression 3 + 1.5 + 4?

" ] }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# float" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "float" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(3+1.5+4)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -97,7 +134,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Square root:\n" @@ -105,13 +144,64 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 13, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Square:\n" ] }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1024" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "2 ** 10" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.4142135623730951" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "2 ** (0.5)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -128,8 +218,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 16, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s = 'hello'\n", @@ -137,6 +229,26 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'e'" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s[1]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -146,8 +258,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 18, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s ='hello'\n", @@ -155,6 +269,26 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'olleh'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s[::-1]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -164,8 +298,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 24, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s ='hello'\n", @@ -177,12 +313,34 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'o'" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a = s.index('o')\n", + "s[a]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ - "# Method 2:\n", - "\n" + "# Method 2:\n" ] }, { @@ -201,22 +359,49 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 30, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Method 1:\n" ] }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "mylist = [0,0,0]" + ] + }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Method 2:\n" ] }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "mylist2 = []\n", + "mylist2.append(0)\n", + "mylist2.append(0)\n", + "mylist2.append(0)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -226,14 +411,25 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 37, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list3 = [1,2,[3,4,'hello']]\n", "\n" ] }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "list3[2][2] = 'goodbye'" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -243,14 +439,27 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 41, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list4 = [5,3,4,6,1]\n", "\n" ] }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "list4.sort()" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -267,8 +476,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 43, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "d = {'simple_key':'hello'}\n", @@ -277,8 +488,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 44, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'hello'" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['simple_key']" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "d = {'k1':{'k2':'hello'}}\n", @@ -287,8 +520,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'hello'" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1']['k2']" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Getting a little tricker\n", @@ -299,14 +554,56 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 58, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['hello']" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1'][0]['nest_key'][1]" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# This will be hard and annoying!\n", "d = {'k1':[1,2,{'k2':['this is tricky',{'tough':[1,2,['hello']]}]}]}" ] }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['hello']" + ] + }, + "execution_count": 65, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1'][2]['k2'][1]['tough'][2]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -335,6 +632,17 @@ "How do you create a tuple?

" ] }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "tup = (1,2,3)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -358,8 +666,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 68, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list5 = [1,2,2,33,4,4,11,22,3,3,2]\n", @@ -367,6 +677,17 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "myset = set(list5)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -427,7 +748,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -437,7 +760,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -447,7 +772,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -457,7 +784,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -467,7 +796,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -483,9 +814,20 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# two nested lists\n", "l_one = [1,2,[3,4]]\n", @@ -520,7 +862,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.6.3" } }, "nbformat": 4, diff --git a/00-Python Object and Data Structure Basics/09-Objects and Data Structures Assessment Test.ipynb b/00-Python Object and Data Structure Basics/09-Objects and Data Structures Assessment Test.ipynb index 149e61af2..af010f975 100644 --- a/00-Python Object and Data Structure Basics/09-Objects and Data Structures Assessment Test.ipynb +++ b/00-Python Object and Data Structure Basics/09-Objects and Data Structures Assessment Test.ipynb @@ -31,15 +31,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Numbers:\n", + "Numbers: data type on number\n", "\n", - "Strings:\n", + "Strings: \n", "\n", - "Lists:\n", + "Lists: \n", "\n", - "Tuples:\n", + "Tuples: like const\n", "\n", - "Dictionaries:\n" + "Dictionaries: \n" ] }, { @@ -56,7 +56,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [] }, @@ -75,10 +77,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "#1. 44\n", + "#2. 29\n", + "#3. 34" + ] }, { "cell_type": "markdown", @@ -87,6 +93,37 @@ "What is the *type* of the result of the expression 3 + 1.5 + 4?

" ] }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# float" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "float" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(3+1.5+4)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -97,7 +134,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Square root:\n" @@ -105,13 +144,64 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 13, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Square:\n" ] }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1024" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "2 ** 10" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.4142135623730951" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "2 ** (0.5)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -128,8 +218,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 16, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s = 'hello'\n", @@ -137,6 +229,26 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'e'" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s[1]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -146,8 +258,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 18, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s ='hello'\n", @@ -155,6 +269,26 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'olleh'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s[::-1]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -164,8 +298,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 24, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "s ='hello'\n", @@ -177,12 +313,34 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'o'" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a = s.index('o')\n", + "s[a]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ - "# Method 2:\n", - "\n" + "# Method 2:\n" ] }, { @@ -201,22 +359,49 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 30, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Method 1:\n" ] }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "mylist = [0,0,0]" + ] + }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Method 2:\n" ] }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "mylist2 = []\n", + "mylist2.append(0)\n", + "mylist2.append(0)\n", + "mylist2.append(0)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -226,14 +411,25 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 37, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list3 = [1,2,[3,4,'hello']]\n", "\n" ] }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "list3[2][2] = 'goodbye'" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -243,14 +439,27 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 41, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list4 = [5,3,4,6,1]\n", "\n" ] }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "list4.sort()" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -267,8 +476,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 43, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "d = {'simple_key':'hello'}\n", @@ -277,8 +488,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 44, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'hello'" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['simple_key']" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "d = {'k1':{'k2':'hello'}}\n", @@ -287,8 +520,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'hello'" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1']['k2']" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Getting a little tricker\n", @@ -299,14 +554,56 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 58, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['hello']" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1'][0]['nest_key'][1]" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# This will be hard and annoying!\n", "d = {'k1':[1,2,{'k2':['this is tricky',{'tough':[1,2,['hello']]}]}]}" ] }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['hello']" + ] + }, + "execution_count": 65, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "d['k1'][2]['k2'][1]['tough'][2]" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -335,6 +632,17 @@ "How do you create a tuple?

" ] }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "tup = (1,2,3)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -358,8 +666,10 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, + "execution_count": 68, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "list5 = [1,2,2,33,4,4,11,22,3,3,2]\n", @@ -367,6 +677,17 @@ "\n" ] }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "myset = set(list5)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -427,7 +748,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -437,7 +760,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -447,7 +772,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -457,7 +784,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -467,7 +796,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Answer before running cell\n", @@ -483,9 +814,20 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# two nested lists\n", "l_one = [1,2,[3,4]]\n", @@ -520,7 +862,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.6.3" } }, "nbformat": 4,