<jupyter_start><jupyter_text>Add comments to Python Notebooks to add clarity to your codeOver the course of this module, we'll be using comments in our code. Learning how to use comments efficiently will greatly improve the readability of your code and help you learn programming tipcis faster. What are comments?In programming, comments are words that the computer will not read when running the code. Their sole purpose is to help developers who are reading and writing code. Comments are great for explaining complex code to others, helping you remember what a certain part of your code does, and reminding you of what needs o be added to your code. How to use comments In Python, comments are as simple as includinga  before the comment that you would like to add.<jupyter_code># This is a comment<jupyter_output><empty_output><jupyter_text>As noted previously, commnets are not run by th ecomputer. If you look at the code below, 2 + 2 is commented out so the computer will only recognize and compute 2 + 3. Try to copy this code into a cell and click the play button.<jupyter_code># 2 + 2
2 + 3<jupyter_output><empty_output><jupyter_text>Another great use of comments is to add TODOs to let you know what still needs to be done. In this example, the comment is reminding a develper to finish a piece of code at a later time.<jupyter_code># TODO Finish analyze space rock function
def analyzeSpaceRock():
    pass<jupyter_output><empty_output><jupyter_text>Block commentsBlock comments are many lines of comments strung together. They can be useful to help explain code to a user who might be unfamiliar with the concepts you're using or to describe what an entire program does.<jupyter_code># This code is a function that will take in
# text and then see what type of spce rock it is
# If the rock matches a certain type of rock
# it will increase the count of that rock type by 1.
# Basalt is a common type of rock found on the moon.

def countRocks(rockText):
    if(rockText == "Basalt"):
        basalt = basalt + 1
        
    return basalt<jupyter_output><empty_output><jupyter_text>Inline commentsInline commnets are written on the same line as written code. Use them sparingly because they can add clutter to your code. They're good at explaining a tricky line of code.<jupyter_code>rocketSpeed = 17000 # rocket speed needd to reach orbit<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.042383550146873686, 'fraction_numerical': 0.00629458665547629, 'mean_word_length': 4.649289099526066, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '128461', 'license': 'MIT', 'n_tokens_mistral': 641, 'n_tokens_neox': 614, 'n_words': 360, 'path': 'write_basic_in_notebooks/comments.ipynb', 'repo_name': 'Jeffresh/Discover-role-python-space-exploration', 'size': '2383'}