<jupyter_start><jupyter_text>Homework 0: Python fundamentals[Kaggle](https://www.kaggle.com/) is a data science platform that has various [tutorials](https://www.kaggle.com/learn/overview) and [competitions](https://www.kaggle.com/competitions), which you may want to go back to later. You are welcome to create a Kaggle account to save your progress, but it's not required.Kaggle, like JupyterHub and Google Colab, is built around Jupyter notebooks. They are not _exactly_ the same, but will feel similar. For this homework:1. Do following Kaggle [Learn Python](https://www.kaggle.com/learn/python) tutorials and exercises. You do not need to turn these in.    - [Hello, Python](https://www.kaggle.com/colinmorris/hello-python)    - [Booleans and Conditionals](https://www.kaggle.com/colinmorris/booleans-and-conditionals)    - [Strings and Dictionaries](https://www.kaggle.com/colinmorris/strings-and-dictionaries)1. Read about:    - [Tuples, lists, and dictionaries](http://sthurlow.com/python/lesson06/)    - [Errors and exceptions](https://swcarpentry.github.io/python-novice-inflammation/09-errors/index.html)1. Do the coding challenges below.1. Do the following Kaggle tutorials and exercises. You do not need to turn these in.    - [Python Lists](https://www.kaggle.com/colinmorris/lists)    - [Creating, Reading, and Writing with Pandas](https://www.kaggle.com/residentmario/creating-reading-and-writing)1. Post a question, per the instructions at the bottom.1. [Turn in this notebook.](https://github.com/afeld/python-public-policyturning-in-assignments) Coding Getting inputTo get information from a user, we can use Python's [`input()`](https://docs.python.org/3/library/functions.htmlinput) function.<jupyter_code>word = input("Give me a word: ")
word<jupyter_output><empty_output><jupyter_text>Step 0: Mad libYou are going to make a (short) interactive [mad lib](https://hobbylark.com/party-games/How-to-Make-Your-Own-Mad-Libs). Use a paragraph of a story or the chorus from a song, or make one up. Prompt for each of the words ("noun", "verb", "vehicle", etc.), then once they are all entered, it output the mad lib with the provided words filled in. You will be using multiple `inputs()` and string concatentation.<jupyter_code># your code goes here<jupyter_output><empty_output><jupyter_text>Numeric input`input()` always returns a string. To get a number from a user in Python, you need to convert that input into a integer (or float).<jupyter_code>num = input("Pick a number, any number. Please enter the value without commas or decimals. > ")
num
type(num)
int(num)<jupyter_output><empty_output><jupyter_text>Step 1: Unemployment benefit eligibility assessmentWe will now make an interactive tool to assess people for unemployment benefits. We will a simplified version of [the rules from the New York State Department of Labor](https://www.labor.ny.gov/formsdocs/ui/TC318.3e.pdfpage=18). To be elegible, one must:- Have lost employment- Have made at least $10,000 in the past year    - Ask for their salary rather than as a yes-or-no question- Be ready, willing and able to work immediately- Be actively seeking workAsk the user questions corresponding to the above, then print `"You are eligible"` or `"You are not eligible"` at the end. You will need:- `input()`s- `int()`- Conditional(s)<jupyter_code># your code goes here<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10870853080568721, 'fraction_numerical': 0.00740521327014218, 'mean_word_length': 4.955908289241623, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 18, 'https://': 14, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '57131', 'license': 'CC0-1.0', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1001, 'n_words': 367, 'path': 'hw_0.ipynb', 'repo_name': 'MatthewMaury/python-public-policy', 'size': '3376'}