<jupyter_start><jupyter_text>Practice Problems Lecture 5Answer each number in a separate cellRename this notebook with your last name and the lecture         ex. Cych_B_05    Turn-in this notebook on Canvas. 1. Doc string    - Create a function  **greeting( )**. Include a doc string that explains what the function does    - In the body, use the command **print ('Hi there')**    - print out the docstring with **help(greeting)**2. Functions    - create a function  called **circleArea( )** . The function should take a radius as an argument and return the area of a circle with that radius ($A=\pi r^2$). Include a doc string (as ALWAYS).     - call the function and print out the result    - Create a function called **add_em_up( )**  that takes an unspecified number of input floating point or integer arguments and returns their sum.    - Call the function with different numbers of arguments and print the sum.3. Modules    - Create a module **myMath.py**  by copying both functions **add\_em\_up(\*args)** and **circleArea(r)** in a  cell    - rename the two functions **add** and **area**    - save the module by using the __%%writefile__ magic command and specifying the file name as **myMath.py**.     - import the **myMath.py** module into your Jupyter notebook and call each function in the module4. Local variables    - define a variable **myName** with your name    - define  a function **greeting( )**  that sets myName to "<NAME>". The function should return the string   "Hello" and the variable **myName**    - print **myName**    - call the function **greeting( )** and print the output    - print **myName** again     - Has the value of **myName** changed after calling the function **greeting( )**?5. Global variables    - define a variable **name** with your name    - define a function **greet( )** that sets the global variable **name** to "<NAME>". The function should return "Hello" and the variable **name**    - print **name**    - call the function **greet( )** and print the output     - print **name**    - Has the value of **name** changed after calling the function **greet( )**?<jupyter_code>%%writefile myMath.py
#import numpy as np
def circleArea(myradius):
    """
    return the area of a circle, given a radius as input
    """
    if myradius is None:
        pass
    else:
        return  np.pi * myradius**2
        #return myarea  
from importlib import reload
#%pycat myMath.py
reload(myMath)

myMath.circleArea(2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10285255122539172, 'fraction_numerical': 0.0044194455604660505, 'mean_word_length': 3.4784172661870505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '478808', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 681, 'n_tokens_neox': 667, 'n_words': 330, 'path': 'Practice_Problems/Lecture_05_Practice_Problems.ipynb', 'repo_name': 'percyd/Python-for-Geosciences', 'size': '2493'}