From 9368e45affecd016fd147e0b1e63cefe62a11b9c Mon Sep 17 00:00:00 2001 From: KatelynBaumann <70774648+KatelynBaumann@users.noreply.github.com> Date: Fri, 11 Sep 2020 14:38:12 -0500 Subject: [PATCH 1/2] Add files via upload --- Labs/Lab.1/Lab 1 Solutions KVB.ipynb | 1 + 1 file changed, 1 insertion(+) create mode 100644 Labs/Lab.1/Lab 1 Solutions KVB.ipynb diff --git a/Labs/Lab.1/Lab 1 Solutions KVB.ipynb b/Labs/Lab.1/Lab 1 Solutions KVB.ipynb new file mode 100644 index 0000000..1cb6990 --- /dev/null +++ b/Labs/Lab.1/Lab 1 Solutions KVB.ipynb @@ -0,0 +1 @@ +{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Copy of Lab-1.ipynb","provenance":[{"file_id":"https://github.com/UTA-DataScience/DATA1401.2020.Fall/blob/master/Labs/Lab.1/Lab.1.ipynb","timestamp":1599851094320}],"collapsed_sections":[]},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.0"}},"cells":[{"cell_type":"markdown","metadata":{"colab_type":"text","id":"O5vg8KKRq0sy"},"source":["# Lab 1\n","\n","## Python Notebooks on Google Colab\n","\n","Data 1401's Labs, Homework, and Exams will be all in form of iPython notebooks. You may already be familiar with python notebooks if you have used Jupyter before. If so, you are welcome to use whatever means you have to run Jupyter notebooks for this course, though you may get limited support. Our primary means of running python notebooks will be through [Google Colab](https://colab.research.google.com). You may also choose to store your files on google drive.\n","\n","You will need a google account. If you do not have one or you wish to use a different account for this course, please follow [these instructions](https://edu.gcfglobal.org/en/googledriveanddocs/getting-started-with-google-drive/1/) to make an account.\n","\n","Once you are ready with your account, you can continue in Colab. Click on the following badge to open this notebook in Colab:\n","\n","[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/UTA-DataScience/DATA1401.2020.Fall/blob/master/Labs/Lab.1/Lab.1.ipynb)\n"]},{"cell_type":"code","metadata":{"id":"mMBDMU5Vjisf","colab_type":"code","colab":{}},"source":["echo"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"FVt_1hPt1dAK"},"source":["## Notebooks in Colab\n","\n","You now are presumably in Colab. Word of caution, by default, Google Colab does not save your notebooks, so if you close your session, you will loose your work.\n","\n","So first thing: from the file menu above select \"Save a copy in Drive\"."]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"x0JBL_RFrDDj"},"source":["## Storing Notebooks in Google Drive (Optional)\n","If you like, you may save your notebooks directly into Google Drive and upload directly to Git (where you will be downloading and uploading your homework). In order properly setup Git, we'll need to work more directly in your Google Drive.\n","\n","On the left sidebar, press the file icon to see a listing of files accessibile to this Notebook. Then press \"Mount Drive\" and follow the instructions to mount your Google Drive in this notebook. A new cell will be inserted into this notebook, which after you run by pressing the play button will instruct you to follow a link to log into your Google Account and enable access to your Drive in another tab. Finally you will copy a link from the new tab back into the cell in this notebook. Once you are done, press refresh under files in the left sidebar and you should have \"drive/My Drive\" appear."]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"hwJ6wJk3tiLv"},"source":["## Github\n","All the class material will be stored on github. You will also submit your homework using github. To do so, you will need a github account.\n","\n","If you do not already have a github account or wish to create a new one for this course, create one:\n","* Browse to [github.com](https://github.com).\n","* Click the green “Sign up for GitHub”\tbutton.\n","* Follow instructions for creating an account.\n","* Make sure you remember your github username and password.\n","\n","Write an email to the course Instructor titled \"Data 1401: Github account\" with your github username (not your password) as the contents.\n","\n","## Google Groups\n","\n","Class annoucements will be made via google groups. If you did not already receive an invite to the class google group, had trouble with the invite, or wish to use a different email address, write an email to the course TA titled \"Data 1401: Google Group\" with your preferred email.\n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"TjfIzdQZqvzk"},"source":["## Introduction: Unix, Git, and Jupyter\n","\n","This lab aims to introduce you to basic Unix, familiarize you with iPython notebooks and get you setup to submit your homework.\n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"C_LmOgzFqvzp"},"source":["\n","\n","### Terminal, Shell, and ssh\n","\n","\n","The terminal is a simple program that generally runs another program, taking mostly keyboard input from you, passing it to this other program, and taking the output of the program and displaying on the screen for you.\n","\n","The terminal usually runs a program called a shell. Shells present a command prompt where you can type in commands, which are then executed when you press enter. In most shells, there are some special commands which the shell will execute. Everything else you type in, the shell will assume is a name of a program you want to run and arguments you want to pass that program. So if the shell doesn't recognize something you type in, it'll try to find a program with a name that is the same as the first word you gave it. \n","\n","### Shell in Colab\n","\n","Unfortunately, google Colab does not allow you to open a terminal window. Jupyter does, so if you are running in Jupyter (which most of you will not be), you may choose to open a terminal window by returning to the jupyter file list tab and selecting new terminal from the top right.\n","\n","For Colab, we will have to do something non-ideal, but functional. There are several ways to execute shell commands from within a python notebook. For example, you can use any shell command by putting \"!\" in front of the command:\n","\n","\n","\n"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"KJ5f-WO0wcAv","colab":{}},"source":["!ls\n","!echo \"----------\"\n","!ls sample_data"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"8f-n4AXFw-dD"},"source":["Unfortunately, every time you use \"!\" a new environment is created and the state reverted to the original state. Try to understand the difference between the following two sets of commands:\n"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"99nrBYTWxZJr","colab":{}},"source":["!echo \"Technique 1:\"\n","!ls\n","!cd sample_data\n","!ls\n"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab_type":"code","id":"2-Znf97Lxl-Z","colab":{}},"source":["!echo \"Technique 2:\"\n","!ls ; cd sample_data ;ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"4x9n1rAkxyYl"},"source":["Notebooks allow a bit of \"magic\" (using \"%\") to avoid some of these limitations:\n"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"vLBPTX4rx3gd","colab":{}},"source":["!echo \"Technique 3:\"\n","!ls \n","%cd sample_data \n","!ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"U8XpvPjcyH0w"},"source":["For our purposes, we are just going to explicitly start a new shell and interact with it in the output cell. Execute the following cell. You will be able to type and execute commands. Look around a bit using \"ls\" and \"cd. You can stop the cell from running by typing \"exit\". You may also stop the shell by pressing play/stop button."]},{"cell_type":"code","metadata":{"colab_type":"code","id":"MIDFitLZyuZy","colab":{}},"source":["!/bin/bash --noediting"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"q-4hfZBywW25"},"source":["While in this instance your shell is running in a this notebook, you can also run terminals natively on your own computer. On Linux or MacOS, you just have to run a program called terminal. In Windows you can start a \"command prompt\". \n","\n","Type in \"ls\" into the terminal above and press enter. The shell will find a program called \"ls\", a standard tool in Unix, and run it. \"ls\" lists the contents (files and directories) of your current directory. \n","\n","For your reference, [Unix/Linux Command Reference](https://github.com/UTA-DataScience/VersionControlSystem/blob/master/VersionControlSystem/linuxRef.pdf) summarizes some of the common shell commands.\n","\n","A subtle point to realize here is that while the terminal is running in the browser that is running on the computer in front of you, the shell is actually running on a machine on google hardware. The shell prompt typically displays the name of the machine you are using. What you are not seeing is that there is an intermidate program between the terminal running on your computer and the shell running on google. This intermidary program is taking your input from the terminal sending it over the network to google and bringing back the responses for you terminal to display.\n","\n","A bit of extra information. If you start a terminal on your own computer, the shell runs locally. The \"ls\" command would then list contents of a directory on your computer. You can typically connect to Unix computers by evoking a shell running on that machine over the network. In this case, you would have to initiate this intermidiary program yourself. The program is called \"ssh\" (secure shell). You can \"ssh\" to another machine from your machine, by simply typing \"ssh\" followed by the machine name or IP address. Most likely you would be prompted for a password, after which you would dropped into the prompt of a shell running on the remote machine. \n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"51Eya4LBqvzs"},"source":["## Programs and Environment Variables\n","\n","You have a listing of your current directory, but you don't know where that directory resides. You can see what directory you are using the command \"pwd\" (print working directory). Issue the command and look at the response. You'll get a slash (\"/\") separated list, known as the path, of the directory hierarchy of your current working directory. On Colab, this will start with \"contents\"\n","\n","Now back to thinking about the command prompt. Since \"ls\" is a program, it most be stored somewhere. It is clearly not in your working directory, because you didn't see it when you executed \"ls\". We can ask the shell to tell us where it found \"ls\" using the \"which ls\" command. Note that \"which\" is also a program. \"which ls\" comes back with \"/bin/ls\", telling you the \"ls\" program is sitting in \"/bin\" directory of the system. \n","\n"]},{"cell_type":"code","metadata":{"id":"ZnWRb4KJjitb","colab_type":"code","colab":{}},"source":["!which ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"ZNSeVUqTjitg","colab_type":"text"},"source":["Lets see what else is in there by issuing a \"ls /bin\" command. "]},{"cell_type":"code","metadata":{"id":"CPk3ITPNjitg","colab_type":"code","colab":{}},"source":["!ls /bin"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"IMoa0c6Ijitm","colab_type":"text"},"source":["You will get a long list of programs. You can run any of these programs by just typing their names and pressing enter. You may be able to guess what some of these programs do, but if you want to know, most of them provide you help, using \"--help\" or \"-h\" flag. For example execute \"ls --help\". Quick note that MacOS is a bit different and so \"--help\" doesn't seem to work."]},{"cell_type":"code","metadata":{"id":"2VSFlqTyjitn","colab_type":"code","colab":{}},"source":["!ls --help"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"CS0t4Rgpjitr","colab_type":"text"},"source":[" For more information about a program or command, you can use Unix's manual pages using the \"man\" command. Try typing \"man ls\". Note that you will need to press space to scroll through lengthy manual pages and \"q\" to exit back to the shell prompt. "]},{"cell_type":"code","metadata":{"id":"2qAvxJdRjitr","colab_type":"code","colab":{}},"source":["!man ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"Rn6za5znjity","colab_type":"text"},"source":["Another command interesting is \"echo\". \"echo\" simply prints whatever you put after it to the screen. "]},{"cell_type":"code","metadata":{"id":"r4ZoXxb6jity","colab_type":"code","colab":{}},"source":["!echo \"Hello World\""],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"5roUKJXXjit3","colab_type":"text"},"source":["At this point, you may wonder how was it that the shell knew to look for programs in \"/bin\"? The shell keeps a list of places to look for programs an environment variable with the name \"PATH\". The shell keeps a table that map string variable names to string expressions. When the shell starts, its configuration files set some environment variables that it uses. You can see the full list of defined environment variables using the command \"printenv\".\n","\n","You can use a environment variable in a shell by prepending name of the variable with a dollar sign character. So you can print out the PATH environment variable using the command \"echo $PATH\". What you will see is a colon (\":\") separated list of directories that the shell will search (in order) whenever you type in anything."]},{"cell_type":"code","metadata":{"id":"4LPk9N_Qjit4","colab_type":"code","colab":{}},"source":["!echo $PATH"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"8Pkm0Xqtjit8","colab_type":"text"},"source":["You can set you own environment variables. Different shells have different syntax. Lets first figure out what shell we are running. \n","\n","*Exercise 1:* Use the \"echo\" command to print out the value of the \"SHELL\" environment variable:"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"YS7YFiPwqvzu"},"source":["!/bin/bash --noediting"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"YoEgruUhqvzw"},"source":["## Navigating Directories\n","\n","You can change your current directory using the \"cd\" shell command. Note that \"cd\" is not a Unix program. Once in a directory, you can use the \"ls\" command to list the contents or \"pwd\" to remind yourself your current working directory. You can move back one level in your current directory hierarchy using \"cd ..\". In general \"..\" represents the path to a directory one level above your current directory, \"../..\" represents two levels up, and so on. \".\" represents the current directory. If you look at the PATH environment variable, you'll notice that the last item is \".\", telling the shell to look into your current directory for commands. Finally the \"~\" character always refers to your home directory.\n","\n","Some other file manipulation commands:\n","\n"," - The \"mkdir\" command creates new directories. \n"," - \"cp\" and \"mv\" allow you to copy and move (or rename) files, taking 2 arguments: the original path/filename and the target path/filename. \n"," - The \"rm\" and \"rmdir\" commands remove (delete) files and directories.\n","\n","\n","*Exercise 2:* Create a new directory called \"Data-1441\", and another directory inside \"Data-1441\" called \"Lab-1-Solutions\". Perform the rest of the lab in this directory."]},{"cell_type":"code","metadata":{"colab_type":"code","id":"A16VzZ3G0J8x","colab":{"base_uri":"https://localhost:8080/","height":83},"outputId":"fccd4648-da8b-4db0-bd19-283e23f3a921"},"source":["!/bin/bash --noediting\n","! mkdir \"Data-1441\" "],"execution_count":null,"outputs":[{"output_type":"stream","text":["bash: cannot set terminal process group (102): Inappropriate ioctl for device\n","bash: no job control in this shell\n","\u001b]0;root@9205aafb8463: /content\u0007\u001b[01;32mroot@9205aafb8463\u001b[00m:\u001b[01;34m/content\u001b[00m# "],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"o38c4lbsqvzy"},"source":["## Exploring Unix Filesystem\n","\n","You can look at the root directory of the system by issuing \"ls /\". As explained in lecture, Unix uses the file system to communicate with devices and between processes. \"/etc\" keeps the configuration files of the system. \"/bin\" and \"/sbin\" store most of the standard Unix programs. \"/usr\" stores installed programs and their associate files, with \"/usr/bin\" usually storing the commands you can run. \n","\n","*Exercise 3:* List the \"/dev\" directory. How many SSD storage devices do you see? How many partitions does each device have? (Answer in box below)"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"yNj2LXzP2ksl","colab":{}},"source":["!/bin/bash --noediting"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"7P9EG0KOqvz2"},"source":["## Text File Manipulation\n","\n","As explained in lecture, Unix stores most information in text files. For example, the list of all users and their home directories are stored in \"/etc/passwd\". Let get some familiarity with the most commonly used commands to manipulate files.\n","\n"," - You can see the contents contents a file using the \"cat\" (concatenate) command. Try executing \"cat /etc/passwd\". You'll get a huge list that will go by your screen quickly. \n"," \n"," - To go through the file page by page, you can use the \"less\" or \"more\" commands. \n"," \n"," - You can see the first or last N (N=10 by default) lines of a file using \"head\" or \"tail\" commands. For example \"tail -20 /etc/passwd\" will list the last 20 lines. \n"," \n"," - You can search a test file using the \"grep\" command, which takes a string keyword as the first argument and a filename as the second, and by default prints out every line in the file that contrains the string. So for example you can do \"grep \\$USER /etc/passwd\" to find the line corresponding to your account. Some useful flags: \n"," \n"," - \"-i\" ignores the case of the keyword\n"," - \"-v\" display those lines that do NOT match \n"," - \"-n\" precede each matching line with the line number \n"," - \"-c\" print only the total count of matched lines \n"," \n"," For example \"grep -c \\$USER /etc/passwd\" should show that you are in the password file just once. \n"," \n"," - The \"wc\" (word count) command counts the number of lines, words, and characters in a file. By default \"wc\" gives you all three numbers, but \"-w\", \"-l\", or \"-c\" flags \n","\n","*Exercise 4:* Count how many lines in the password file contain the letter \"w\". "]},{"cell_type":"code","metadata":{"colab_type":"code","id":"UlsANMuf2qMs","colab":{}},"source":["!/bin/bash --noediting"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"SZuhLbD8qvz5"},"source":["## Redirection\n","\n","Unix provides programs \"pipes\" for input and output. Most of what you see on the screen when you run a program was written to the \"stdout\" (standard output) pipe. Other pipes are \"stdin\" (standard input) and \"stderr\" (standard error), where error messages are written.\n","\n","As discussed in lecture, the basic commands of are simple, but you can chain them to do complicated things. Redirection is how you chain these commands, directing the output of one command to the input of the next.\n","\n","As an example, consider the \"cat\" command. Cat takes stdin and outputs it to stdout. Type \"cat\" and press enter and confirm. You can get back to the command prompt by pressing \"control-c\" (sends terminate singal) or \"control-d\" (end of file character). Note that from now on we will use the convention: \"control-d\" = \"^D\"\n","\n","*Exercise 5a:* Using \"cat\" and indirection you can write things into a file. The \">\" symbol directs stdout into a file. Try \"cat > favorite-colors-list.txt\" and then type in your 3 favorite colors, each on it's own line. Use \"^D\" to end your input."]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"H5vxtcXnqvz6"},"source":["Use \"cat\", \"more\", or \"less\" to confirm that you file is as you expect it. \">>\" allows you to append to the file. \n","\n","*Exercise 5b:* Append 2 more colors to your file."]},{"cell_type":"code","metadata":{"colab_type":"code","id":"twRKNaGy3XGw","colab":{}},"source":["!/bin/bash --noediting"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"DZODNKiAqvz8"},"source":["The \"sort\" command sorts what it sees on stdin. Instead of taking input from the terminal, you can direct the shell to take stdin from a file using \"<\". Try \"sort < favorite-color-list.txt\" and \"sort < favorite-color-list.txt > sorted-favorite-color-list.txt\".\n","\n","Finally, instead of piping input / output into files, you can directly chain one program into another using \"|\". So for example, you can do \"cat /etc/passwd | grep -i \\$USER | wc -l\". \n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"v5IaZXNyqvz_"},"source":["## Git\n","\n","`git` is a Version Control System (VCS), typically used to organize the source code of software project but also good source of documents or web-pages. An instance of `git` server stores repositories, each typically containing the code relevant to a specific project. Users create local `clones` of repositories, change and develop the local copies of the code, `commit` the changes to their local repository, `push` to the server as a contribution, `pull` updates from the server, and `merge` changes between local and remote versions. \n","\n","Besides cloning, repositories can be branched or forked. A repository generally starts with a `master` branch that evolves as push requests are merged in. Creating a new branch from an existing branch creates a snapshot of the which can evolve independently or be merged in later. Branches are easy to make and delete, and can serve various purposes. They can represent a stable version of software package. Or a parallel development for different operating system. A fork of a repository is a standalone instance of the repository which can be stored and managed independently from the original, where you can work independently without constraints or interference. \n","\n","[GitHub](github.com) provides a massive publically accessible instance of a `git` system besides sharing code, projects can be developed by the open source community. It provides tools for managing your repository and a wiki for documentation. Contributions to public software on GitHub generally require making a merge request which would be judged by the managers of the repository. That's why most software packages enourage you to create a new fork, so you can work independently.\n","\n","Lets take a look at some repositories:\n","\n","* [This class](https://github.com/UTA-DataScience/DATA1401.2020.Fall)\n","\n","\n","Read through [Version Control System Lecture](https://github.com/UTA-DataScience/SpecialTopics/blob/master/VersionControlSystem/README.md) to better understand `git`. Note that you do not need to do the exercises at the end of the lecture.\n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"J_R64sQDqv0A"},"source":["## Plan\n","\n","You made a clone of the class repository at start of this lab. We will create a new fork where you can keep track and submit your work, following [these instructions](https://help.github.com/articles/fork-a-repo/).\n","\n","Goto to github.com and log in.\n","\n","Next, lets create a fork of the [class repository](https://github.com/UTA-DataScience/DATA1401.2020.Fall). Click the link and press the \"Fork\" button on the top right. Select your repository as where you want to place the fork.\n","\n","We show here two methods of using `git` to submit your work for this class. "]},{"cell_type":"markdown","metadata":{"id":"plOKkd04jiuZ","colab_type":"text"},"source":["## Using Your Web Browser\n","\n","### Updating your fork\n","\n","You should update your fork of the class repository everytime frequently to make sure you have all of up-to-date class material. \n","\n","* Goto the github page for *your fork* of the class repository. If there is an update, uyou should see a message \"This branch is N commit behind UTA-DataScience:master\" (where N=>1). \n","\n","* Follow the \"Pull Request\" link. \n","\n","* Select *your* fork of the repository as the base.\n","\n","* Select the main course repository as the head.\n","\n","* Create a pull request. (Takes two steps.)\n","\n","* Merge the pull request and confirm (green buttons).\n","\n","### Submitting your work\n","\n","Once you are done working on a lab (presumably on Colab) and are ready to submit:\n","\n","* Download your lab via the File -> \"Download .ipynb\". You will now have a copy of your notebook on your personal computer. \n","\n","* Rename the file so it is not identical to the filename provide. I suggest \"Lab.1.solutions.ipynb\" for example. Make sure you keep the \".ipynb\" extension.\n","\n","* Goto the github page for *your fork* of the class repository. \n","\n","* Navigate to the approprate directories (for example \"Labs/Lab.1\"). \n","\n","* Use the \"Add file\" near the top left of the page to \"Add files\" (if first time) or \"Upload files\" (if you are updating your solutions).\n","\n","* After the upload, make sure that your solutions were properly upload to navigating them in github.\n"]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"edTvE6rOqv0C"},"source":["## Using Command Line Interface\n","\n","Now we will check out your fork in your Google Drive / Colab.\n","\n","Note: Jupyter allows you to run shell directly in a notebook. We will use `!` and `%` to call shell commands directly in this notebook. Follow along yourself. Either create a new notebook or open a terminal. \n","\n","Start by listing the contents of your current directory."]},{"cell_type":"code","metadata":{"colab_type":"code","id":"e5tXg0f8qv0D","colab":{}},"source":["!ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"WYsyYcg1qv0J"},"source":["Make a new directory:"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"Z7noY1hMqv0L","colab":{}},"source":["!mkdir Data-1401-Repo\n","%cd Data-1401-Repo"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"fwsBdTnYqv0Q"},"source":["From the github page for your fork, press the green \"Clone or download\" button and copy the URL.\n","\n","Goto to your notebook and use the following command to clone the repository, pasting the URL you just copied:\n"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"8w42MH6Jqv0S","colab":{}},"source":["# What you past here should look like:\n","#!git clone https://github.com//DATA1401.2020.Fall.git"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"cOAuqTVUqv0V"},"source":["Go into the directory:"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"b1Ew4tEZqv0X","colab":{}},"source":["%cd DATA1401.2020.Fall\n","!ls"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"IrhWToc-qv0a"},"source":["We will now connect your fork to the original so you can pull changes from there. \n","\n","Check remote status:"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"JxtMYR-9qv0c","colab":{}},"source":["!git remote -v"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"9ud3X0fBqv0f"},"source":["Now use the original class URL to set your upstream:"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"pgJlKxBqqv0h","colab":{}},"source":["!git remote add upstream https://github.com/UTA-DataScience/DATA1401.2020.Fall"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab_type":"code","id":"id2yUEt9qv0k","colab":{}},"source":["!git remote -v"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"sAkgeJ6Iqv0n"},"source":["From now on, you can get the newest version of class material by using:"]},{"cell_type":"code","metadata":{"colab_type":"code","id":"AGDsfTFLqv0o","colab":{}},"source":["!git pull"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"colab_type":"text","id":"u9RAhs5b4vXY"},"source":["We will submit your Lab 1 using git at the next Lab."]}]} \ No newline at end of file From fb1cddb906c1ea0c74713e5839b24776579195cb Mon Sep 17 00:00:00 2001 From: KatelynBaumann <70774648+KatelynBaumann@users.noreply.github.com> Date: Fri, 25 Sep 2020 15:08:37 -0500 Subject: [PATCH 2/2] Created using Colaboratory --- Copy_of_Copy_of_Lab_2.ipynb | 639 ++++++++++++++++++++++++++++++++++++ 1 file changed, 639 insertions(+) create mode 100644 Copy_of_Copy_of_Lab_2.ipynb diff --git a/Copy_of_Copy_of_Lab_2.ipynb b/Copy_of_Copy_of_Lab_2.ipynb new file mode 100644 index 0000000..4890bcf --- /dev/null +++ b/Copy_of_Copy_of_Lab_2.ipynb @@ -0,0 +1,639 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Copy of Copy of Lab-2.ipynb", + "provenance": [], + "collapsed_sections": [], + "include_colab_link": true + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.0" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uk7yc0nadBGa" + }, + "source": [ + "# Lab 2\n", + "\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/UTA-DataScience/DATA1401.2020.Fall/blob/master/Labs/Lab.2/Lab.2.ipynb)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "u9RAhs5b4vXY" + }, + "source": [ + "\n", + "## Make your fork private\n", + "\n", + "Navigate your fork of the course repository on GitHub and click the \"gear\" icon to change the settings. Select \"Options\" on the left and scroll all the way down. Then click on \"Make Private\" to make your repository private. \n", + "\n", + "Next select the collaborators on the left and add your Professor as a collaborator. " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "q-gMWiE4dBG_" + }, + "source": [ + "## Python Programming\n", + "\n", + "In the remainder of this lab you will practice python by solving some simple exercises. \n", + "\n", + "*Exercise 1:* Write 2 functions `even(x)` and `odd(x)` that take an integer and returns True if the input is even or odd, otherwise returns False. Use cell below for your solution. Use the subsequent cell to demonstrate that your solution works. Feel free to add additional cell as needed using the \"+\" button on the button bar above. " + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "jwN5jff1dBG_", + "outputId": "4a1ee161-5a53-471b-a8a3-433807d19cb4", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 136 + } + }, + "source": [ + "# Write you solution here\n", + "def even(num):\n", + " if num%2==0:\n", + " return True\n", + " else:\n", + " return False" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "error", + "ename": "IndentationError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m5\u001b[0m\n\u001b[0;31m else:\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m unindent does not match any outer indentation level\n" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "xNJAcodhdBHB", + "outputId": "292231c3-603d-43a5-af4f-4a6a9858e180", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 267 + } + }, + "source": [ + "# Test your solution here\n", + "\n", + "print(\"Even test, even input:\",even(2))\n", + "print(\"Even test, odd input;\", even(221))\n", + "\n", + "print(\"Odd\" test, even input:\",odd(2))\n", + "print(\"Odd test, odd input:\",odd(221))" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "text": [ + "Even test, even input: True\n", + "Even test, odd input; False\n" + ], + "name": "stdout" + }, + { + "output_type": "error", + "ename": "NameError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Even test, odd input;\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0meven\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m221\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Odd test, even input:\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0modd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Odd test, odd input:\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0modd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m221\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'odd' is not defined" + ] + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "KL_pyzG8dBHD" + }, + "source": [ + "*Exercise 2:* Write a function that takes a list of numbers as input and returns a list of the subset of elements that are less that 10. Test your solution." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "g8nt0wnldBHE" + }, + "source": [ + "# Write you solution here\n", + "def less_than_ten_0(lst):\n", + " out_lst=list()\n", + " for element in lst:\n", + " if element<10:\n", + " out_lst.append(element)\n", + " \n", + " return out_lst\n", + "\n", + "\n", + "def less_than_ten(lst):\n", + " return list(filter(lambda x: x<10,lst)) \n", + "\n" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "__HTUWA1dBHH", + "outputId": "68fc7a2a-5656-4dde-f6db-9190f0255f27", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 36 + } + }, + "source": [ + "# Test your solution here\n", + "\n", + "less_than_ten([1,2,4,456,6,77,8,78])" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[1, 2, 4, 6, 8]" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 16 + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "T0cx91JudBHK" + }, + "source": [ + "*Exercise 3:* Write a function that takes a number `x_max` as input and returns a function that performs the same task as exercise 2, but for `x_max` instead of 10." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "PqummMcmdBHK", + "outputId": "dd66cc1c-e917-43c4-f9de-52c3df3dbce8", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 193 + } + }, + "source": [ + "# Write you solution here\n", + "input=x_max(10)" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "error", + "ename": "NameError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Write you solution here\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mx\u001b[0m\u001b[0;34m=\u001b[0m \u001b[0mx_max\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mNameError\u001b[0m: name 'x_max' is not defined" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "evRYemjXdBHN" + }, + "source": [ + "# Test your solution here" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "h0I8M27LdBHP" + }, + "source": [ + "*Exercise 4:* Write a function that takes an interger as input and returns a list of all divisors of that number." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "k6GUpDyrdBHP", + "outputId": "0e16ad6e-4bda-4fb4-8648-8ab2404f71a6", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 54 + } + }, + "source": [ + "# Write you solution here\n", + "def sum_div(number):\n", + " divisors = [1]\n", + " for i in range(2, number):\n", + " if (number % i)==0:\n", + " divisors.append(i)\n", + " return sum(divisors)\n", + "print(sum_div(8))\n", + "print(sum_div(12))" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "text": [ + "3\n", + "3\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "YDvRmft-dBHR", + "outputId": "f26224cd-d16d-4eed-cc61-a134d9893c5e", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 54 + } + }, + "source": [ + "# Test your solution here\n", + "def sum_div(number):\n", + " divisors = [1]\n", + " for i in range(2, number):\n", + " if (number % i)==0:\n", + " divisors.append(i)\n", + " return sum(divisors)\n", + "print(sum_div(4))\n", + "print(sum_div(8))" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "text": [ + "3\n", + "3\n" + ], + "name": "stdout" + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "IOWnLMvxdBHT" + }, + "source": [ + "*Exercise 5:* Write a function that takes 2 lists as input and returns a list that contains only the elements that are common between the lists (without duplicates). Make sure your program works on two lists of different sizes." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "tR31bnTDdBHT", + "outputId": "fd1e51f5-8f0b-4840-b12a-4c1c1ace07ab", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 136 + } + }, + "source": [ + "# Write you solution here\n", + "def common_member(a,b):\n", + "a_set\n", + "\n", + "b_set = set(b)\n", + "if (a_set & b_set)\n", + "else:\n", + " print(\"no common elements\")" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "error", + "ename": "IndentationError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m3\u001b[0m\n\u001b[0;31m a_set= set(a)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block\n" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "IJDf6ebYdBHV" + }, + "source": [ + "# Test your solution here" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "3vA7M9pldBHX" + }, + "source": [ + "*Exercise 6:* Write a function that reads takes a string and returns `True` if the string is a palindrome. (A palindrome is a string that reads the same forwards and backwards.)" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "ncyMDzp6dBHX" + }, + "source": [ + "# Write you solution here\n", + "def is_palilndrome(S):\n", + " if S[0] == S(-1):\n", + " return print (\"true\")\n", + " else:\n", + " return print (\"false\")" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "v5cmVQ6MdBHZ", + "outputId": "6697cd7f-3583-43dc-9ebe-0abd7c8c7d88", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 136 + } + }, + "source": [ + "# Test your solution here\n", + "def is_palilndrome(S): 34834\n", + "if S[0] == S(-1):\n", + " \"return\" print (\"true\")\n", + "else:\n", + " return print (\"false\")" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "error", + "ename": "SyntaxError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m4\u001b[0m\n\u001b[0;31m \"return\" print (\"true\")\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "fT35xwandBHc" + }, + "source": [ + "*Exercise 7:* Write a Rock-Paper-Scissors game function, that takes 2 strings, the inputs of player 1 and player 2, and output 1 or 2 corresponding to which player wins, or 0 if draw.\n", + "\n", + "Implement a Rock-Paper-Scissors game by soliciting input from 2 players, testing with this function, and repeating if there is a draw.\n", + "\n", + "Remember the rules:\n", + "\n", + "* Rock beats scissors\n", + "* Scissors beats paper\n", + "* Paper beats rock" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "U1_HxxaWdBHd" + }, + "source": [ + "# Write you solution here\n" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "ooR2ldZBdBHf" + }, + "source": [ + "# Test your solution here" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "dJQzXNKzdBHh" + }, + "source": [ + "*Exercise 8:* Write a function that takes a integer `n` as input and \n", + "outputs a list of the first `n` Fibonnaci numbers.\n", + "\n", + "The Fibonnaci seqence is a sequence of numbers where the next number in the sequence is the sum of the previous two numbers in the sequence. The sequence looks like this: 1, 1, 2, 3, 5, 8, 13, …)" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "G_4ooRXTdBHh" + }, + "source": [ + "# Write you solution here\n", + "def fibonnaci_numbers(n):\n", + " f1 = 1\n", + " f2 = 1\n", + " f3 = 3\n", + " f4 = 3\n", + " f5 = 5\n", + " f6 = 8\n", + " f7 = 13\n", + " if (n<1):\n", + " for n in range(0, n):\n", + " print(f2, end)\n", + " next = f1 + f2\n", + " f1 = f2 \n", + " f2 = next" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "rzK5FskJdBHj" + }, + "source": [ + "# Test your solution here\n", + "def fibonnaci_numbers(n):\n", + " f1 = 1\n", + " f2 = 1\n", + " f3 = 3\n", + " f4 = 3\n", + " f5 = 5 \n", + " f6 = 8 \n", + " f7 = 13\n", + " if (n<1):\n", + " for n in range(0, n):\n", + " print(f2, end)\n", + " next = f1 + f2 \n", + " f1 = f2 \n", + " f2 = next" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "q6c_AskadBHl" + }, + "source": [ + "*Exercise 9:* Write a function that takes a string of consisting of several words and returns a string that reverses the order of the words.\n" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "aJdXX6FHdBHl", + "outputId": "f73c792e-2adc-43e7-cbd9-d7ca9aceaac1", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 249 + } + }, + "source": [ + "# Write you solution here\n", + "def wordreverse(str): \"hello world\"\n", + "i = len(-1)(str)-1\n", + "start = end = i+1\n", + "result = \"\"\n", + "\n", + "Str = 'hello world'\n", + "print(wordreverse(str))\n" + ], + "execution_count": null, + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "ignored", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Write you solution here\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwordreverse\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"hello world\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mi\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mstart\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: object of type 'int' has no len()" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "nQyhnLZ_dBHn" + }, + "source": [ + "# Test your solution here\n", + "def wordreverse(str): \n", + " i =les(str)-1\n", + " start=end=i+1\n", + " result = \"\"\n", + "\n", + " Str='hello world'\n", + " print(wordreverse(str))" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "NFSmRaSydBHq" + }, + "source": [ + "*Exercise 10:* Write a guessing game program that will repeatedly guess a number that the users picks, with the user indicating higher or lower, until it correctly guesses the number." + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "Ie2E1JzCdBHr" + }, + "source": [ + "# Write you solution here" + ], + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "6T8YdWSMdBHs" + }, + "source": [ + "# Test your solution here" + ], + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file