<jupyter_start><jupyter_text>--- Lambda School Data Science - Intro to Python  --- 03 - Python Lists & Loops--- STOP! BEFORE GOING ANY FURTHER...  1. Click "File" at the top.2. Then, "Save a Copy in Drive."3. Change the file name to "FIRSTNAME_LASTNAME_1_2"  Now you have a copy of this notebook in your Drive account. This is the copy you'll edit and submit. Be sure to do this for ***every*** assignment!  Part 1: Lists  Use the provided lists to answer the questions and prompts.Make sure to run the cell so the lists are declared with their corresponding values.<jupyter_code>heights = [184, 177, 190, 188, 159, 166]
weights = [84.5, 81.8, 86.1, 92.2, 69.6, 72.0 ]
names = ['John', 'Ryan', 'Bobby', 'Pete', 'Esther', 'Jane']<jupyter_output><empty_output><jupyter_text>1.1 Create a new empty list named "BMI".<jupyter_code>BMI = []<jupyter_output><empty_output><jupyter_text>1.2 Combine the three lists into a new list where each element is a person's name, weight, and height. Call it "person_data".<jupyter_code>person_data = (['John', 184, 84.5],['Ryan', 177, 81.8],['Bobby', 190, 86.1],['Pete', 188, 92.2,],['Esther', 159, 69.6],['Jane', 166, 72.0])
type(person_data)<jupyter_output><empty_output><jupyter_text>1.3 Retrieve the last element of person_data.<jupyter_code>person_data = [['John', 184, 84.5],['Ryan', 177, 81.8],['Bobby', 190, 86.1],['Pete', 188, 92.2,],['Esther', 159, 69.6],['Jane', 166, 72.0]]

person_data

person_data[5]<jupyter_output><empty_output><jupyter_text>1.4 Retrieve the 2nd and 3rd elements of person_data.<jupyter_code>person_data[1], person_data[2]

person_data[1:3]<jupyter_output><empty_output><jupyter_text>1.5 Change the 1st element of person_data: increase weight to 84.9. Keep the other values unchanged.<jupyter_code>person_data[0][2]=84.9
person_data<jupyter_output><empty_output><jupyter_text>1.6 Add another person, Samantha, to person_data. Her height is 162 cm and her weight is 51.3 kg.<jupyter_code>person_data

person_data.append(['Samantha', 162, 51.3])

person_data<jupyter_output><empty_output><jupyter_text>Part 2: Loops  2.1 Explain a for loop in your own words.<jupyter_code># Comment your answer like so...
# A for loop is a way of printing out values or things in a list, and iterating over a sequence<jupyter_output><empty_output><jupyter_text>*Or add it to this Text Cell...*  2.2 Use a for loop to calculate the BMI of each person.>$\frac{Weight(kg)}{Height(m)^2} = BMI$<jupyter_code># I can't figure this out for my LIFE 
# So I am moving on - I don't understand how to pinpoint the values 
# that I want in my formula, and it doesn't seem like it should be this complicated<jupyter_output><empty_output><jupyter_text>2.2 BONUS: Do it using list comprehension.<jupyter_code># No idea<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13210943124550037, 'fraction_numerical': 0.05903527717782577, 'mean_word_length': 5.523474178403756, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 42, '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': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '430625', 'license': 'MIT', 'n_tokens_mistral': 1112, 'n_tokens_neox': 977, 'n_words': 321, 'path': 'Python_Lists_and_Loops.ipynb', 'repo_name': 'kvinne-anc/Data-Science-Notebooks', 'size': '2778'}