<jupyter_start><jupyter_text>Quiz 0101  Provide the answers in Python code: 1).  In the class A, students' heights are:161.5 165.9 168.7 163.1 170.8 167.2 Calculate the mean height by using Python 'list' and 'for' loop:<jupyter_code>def height(list2):
    n=len(list2)
    for i in range(n):
        height = 0
        height = height + i
    avg = height/ n
    return avg

list1= [161.5,165.9,168.7,163.1,170.8,167.2]
height(list1)<jupyter_output><empty_output><jupyter_text>2).  In the class B, students' heights are:172.5 162.9 161.7 160.1 161.8 169.2 Calculate the mean height by using Python 'list' and 'for' loop:<jupyter_code>def height(list2):
    n=len(list2)
    for i in range(n):
        height = 0
        height = height + i
    avg = height/ n
    return avg

list1= [172.5,162.9,161.7,160.1,161.8,169.2]
height(list1)<jupyter_output><empty_output><jupyter_text>3). The class A and the class B are joined together to form the class AB. Calculate the mean height by using Python 'list' and 'for' loop:<jupyter_code>def height(list2):
    n=len(list2)
    for i in range(n):
        height = 0
        height = height + i
    avg = height/ n
    return avg

listA= [1,2,3,4,5]
listB=[6,6,7,8,9]
listc = listA + listB
print(listc)
print(height(listc))<jupyter_output>[1, 2, 3, 4, 5, 6, 6, 7, 8, 9]
0.9<jupyter_text>4). Sort the heights of the class AB.<jupyter_code>listA= [1,2,3,4,5]
listB=[6,6,7,8,9]
listc = listA + listB
listc.sort()
print(listc)<jupyter_output>[1, 2, 3, 4, 5, 6, 6, 7, 8, 9]
None
{'fraction_non_alphanumeric': 0.14134742404227213, 'fraction_numerical': 0.10501981505944517, 'mean_word_length': 3.590909090909091, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '656692', 'license': 'MIT', 'n_tokens_mistral': 718, 'n_tokens_neox': 620, 'n_words': 177, 'path': 'Rafay notes/Samsung Course/Chapter 2/Quiz/Mohammad Abdul Rafay BSe183009 (2).ipynb', 'repo_name': 'rafay99-epic/Ssmsunng-Innovation-Campus-Notes', 'size': '1514'}