<jupyter_start><jupyter_text>Lab 4: Introduction to PythonIn this lab you will be working on python basics.I have recorded a video to get you started with this lab: [Click here to view the video](https://vimeo.com/570824958).The lab is slightly different and updated, but the idea is very similar.**This lab must be completed individually.**Where provided, try your best to match the **Sample Output** as best as you can. Accept the lab To accept this lab on GitHub Classroom, go to `Canvas` --> `Course Content` --> `Lab Links and Solutions`.  Task 2: Python Fundamentals IIThis part of the lab takes you through some of the fundamental components of Python.  2.1: `if-elif-else` statementsFill in missing pieces of the following code such that print statements make sense. You should replace  with your code.<jupyter_code>name = '<NAME>'
### Your solution here

if <YOUR_CODE_HERE>:
    print(f"Name {name} is more than 20 chars long")
    length_description = 'long'
elif <YOUR_CODE_HERE>:
    print(f"Name {name} is more than 18 chars long")
    length_description = 'semi long'
elif <YOUR_CODE_HERE>:
    print(f"Name {name} is more than 15 chars long")
    length_description = 'semi long'
elif <YOUR_CODE_HERE>:
    print(f"Name {name} is 9, 10 or 11 chars long")
    length_description = 'semi short'
else:
    print(f"Name {name} is a short name")
    length_description = 'short'<jupyter_output><empty_output><jupyter_text>2.2: `for` loopsFill  in the code snippet below so that this sample output is printed: Sample Output> A> AA> AAA> AAAA> AAAAA> AAAA> AAA> AA> A<jupyter_code>### Your solution here

n = 10
for i in range(1,n):
    if <YOUR_CODE_HERE>:
        print("A" * <YOUR_CODE_HERE>)
    else:
        print("A" * (<YOUR_CODE_HERE>))<jupyter_output><empty_output><jupyter_text>2.3: `for` loops and `lists`We have given you some sample code, as well as a list called `data`. > data = [53,9,5,90,63,5,97,40,92,48,53,8,38,63,13,15,66,81,57,79,42,91,25,89,66,4,73,45,80,17]For each of the exercises 1C1 - 1CX, use the `data` list to answer the question by writing the appropriate bits of python code.  2.3.1: Print values that are within 25 (lower bound) and 45 (upper bound) including both ends.*Hint: Use a for loop and loop through each of the elements in data, and store it into a list. Then, print the list* Sample output:> [40, 38, 42, 25, 45]<jupyter_code>data = [53,9,5,90,63,5,97,40,92,48,53,8,38,63,13,15,66,81,57,79,42,91,25,89,66,4,73,45,80,17]

### Your solution here<jupyter_output><empty_output><jupyter_text>2.3.2: Write code to calculate and print the maximum, minimum, sum, count, and average of items in `data`*Hint: for the mean, you will need to combine the sum and the count* Sample output> The max is: 97 > The min is: 4 > The sum is: 1507 > The count is: 30 > The mean is: 50.233333333333334<jupyter_code>### Your solution here

print(f"The max is: {<YOUR_CODE_HERE>}")
print(f"The min is: {<YOUR_CODE_HERE>}")
print(f"The sum is: {<YOUR_CODE_HERE>}")
print(f"The count is: {<YOUR_CODE_HERE>}")
print(f"The mean is: {<YOUR_CODE_HERE>}")<jupyter_output><empty_output><jupyter_text>2.4: Using list comprehension (NOT for loops), print out the numbers within the specified upper and lower bounds (inclusive) of 12 and 80. Sample output:> [53, 63, 40, 48, 53, 38, 63, 13, 15, 66, 57, 79, 42, 25, 66, 73, 45, 80, 17]<jupyter_code>### Your solution here<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12024575775307197, 'fraction_numerical': 0.0684610883557636, 'mean_word_length': 5.019366197183099, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 53, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '658551', 'license': 'MIT', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1169, 'n_words': 440, 'path': 'notes/week05/lab/Task2.ipynb', 'repo_name': 'ubco-cmps/data301_course', 'size': '3428'}