<jupyter_start><jupyter_text>Problem 1   Using the following dictionaries, create a list called `students` that contains lloyd, alice, and tyler.<jupyter_code>from gofer.ok import check

lloyd = {
    "name": "Lloyd",
    "homework": [90.0, 97.0, 75.0, 92.0],
    "quizzes": [88.0, 40.0, 94.0],
    "tests": [75.0, 90.0]
}
alice = {
    "name": "Alice",
    "homework": [100.0, 92.0, 98.0, 100.0],
    "quizzes": [82.0, 83.0, 91.0],
    "tests": [89.0, 97.0]
}
tyler = {
    "name": "Tyler",
    "homework": [0.0, 87.0, 75.0, 22.0],
    "quizzes": [0.0, 75.0, 78.0],
    "tests": [100.0, 100.0]
}
# write your code below this line



# write your code above this line
check('tests/lab8_p1.py')<jupyter_output><empty_output><jupyter_text>Write a function `average` that takes a list of numbers and returns the average.* Inside that function, call the built-in `sum()` function with the numbers list as a parameter. Store the result in a variable called `total`.* Divide `total` by the length of the numbers list. Use the built-in `len()` function to calculate that.* Return that result. Test your function. Call your `get_average` function with `[1,2,3]`. Assign the resulting average to a variable called `avg_flt` and print.<jupyter_code># write your code above this line
check('tests/lab8_p2.py')<jupyter_output><empty_output><jupyter_text>Write a function called `get_average` that takes a student dictionary (like `lloyd`, `alice`, or `tyler`) as input and returns the student's weighted average.* Make a variable `homework` that stores the `average()` of `student["homework"]`.* Repeat step 2 for `quizzes` and `tests`.* Multiply the 3 averages by their weights and return the sum of those three. Homework is 10%, quizzes are 30% and tests are 60%. Test your function. Call your `get_average` function with `lloyd` and set the result to a variable called `lloyd_avg_flt`. Print the resulting average grade.<jupyter_code># write your code above this line
check('tests/lab8_p3.py')<jupyter_output><empty_output><jupyter_text>Define a new function called `get_letter_grade` that has one argument called `score`. Expect `score` to be a number. Inside your function, test `score` using a chain of `if:` / `elif:` / `else:` statements, like so:* If score is 90 or above: return "A"* Else if score is 80 or above: return "B"* Else if score is 70 or above: return "C"* Else if score is 60 or above: return "D"* Otherwise: return "F" Finally, test your function. Call your `get_letter_grade` function with the result of `get_average(lloyd)` and assign the result to a variable caled `lloyd_avg_str`. Print the resulting letter grade.<jupyter_code># write your code above this line
check('tests/lab8_p4.py')<jupyter_output><empty_output><jupyter_text>Define a function called `get_class_average` that has one argument, `students`. You can expect `students` to be a list containing your three students.* First, make an empty list called `results`.* For each student item in the class list, calculate `get_average(student)` and then call `results.append()` with that result.* Finally, return the result of calling `average()` with `results`.* Finally, assign the result of calling `get_class_average` with your `students` list to a variable called `class_avg_flt` and print. Your students should be `[lloyd, alice, tyler]`.<jupyter_code># write your code above this line
check('tests/lab8_p5.py')<jupyter_output><empty_output><jupyter_text>Then, assign the result of `get_letter_grade` for the class's average to a variable called `class_avg_str` and print.<jupyter_code># write your code above this line
check('tests/lab8_p6.py')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11661647960580344, 'fraction_numerical': 0.031480974541472764, 'mean_word_length': 4.99016393442623, 'pattern_counts': {'":': 12, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '74072', 'license': 'MIT', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1159, 'n_words': 467, 'path': 'week_2/.ipynb_checkpoints/day_8_lab-checkpoint.ipynb', 'repo_name': 'brown-ccv/python-workshop-2020', 'size': '3653'}