<jupyter_start><jupyter_text>Classwork 3Author(s): <NAME>, <NAME> :Consider a Gaussian function:$$g(x) = \frac{1}{\sqrt{2\pi}},\exp\left[-\frac{x^2}{2}\right].$$This is the "bell-curve" from statistics, centered at $x=0$ with standard deviation of $1$. Your task is to verify numerically that the integral of this function over $x$ is normalized to $1$.<jupyter_code>import gaussian as gauss<jupyter_output><empty_output><jupyter_text>Exerceise 1This module has three functions, g(x), interval(f, a, b, dx), integrate(i,dx).g(x) calculates the value of the Gaussian function at that point given the parameter x.interval(f, a, b, dx) creates a list of evenly spaced coordinates within the given interval with parameters a and b as the left and right endpoints, f as any function of a single variable, and dx as the space between each point.integrate (i,dx) integrates the Gaussian function over the previously defined interval using parameters i as the interval and dx as the space between coordinates.<jupyter_code>gauss.interval(gauss.g,0,2,.2)
gauss.integrate(gauss.interval(gauss.g,0,2,.2),.2)
import test_gaussian as test_g<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1063094209161625, 'fraction_numerical': 0.013828867761452032, 'mean_word_length': 6.148148148148148, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '172739', 'license': 'MIT', 'n_tokens_mistral': 362, 'n_tokens_neox': 347, 'n_words': 137, 'path': 'cw03.ipynb', 'repo_name': 'chapman-phys220-2017f/cw-03-baylee-and-christine', 'size': '1178'}