<jupyter_start><jupyter_text><jupyter_code># average grades for ISEG programs 2020
economia=164.0
gestao=167.5
maeg=187.5
management=167.0
economics=162.5
finance=160.0
# create a list with average grades of economics programs
# the list will have as elements the average grade of economia
# and average grade of economics
list1 = [economia,economics]
list1
#create a list with average grades of managment programs
# the list will have as elements the average grade of managment,
# the average grade of finance and average grade of gestao
list2 = [management,finance,gestao]
list2
#create a list with average grades of mathmatics programs
# the list will have as elements the average grade of maeg
list3 = [maeg]
list3
#What is the purpose of using extend<jupyter_output><empty_output><jupyter_text>The `extend()` method adds the specified list elements (or any iterable) to the end of the current list.<jupyter_code>#What is the purpose of using append<jupyter_output><empty_output><jupyter_text>The `append()` method appends an element to the end of the list.<jupyter_code>#How many elements does listAll1 have?
listall1 = []
listall1.append(list1)
listall1.append(list2)
listall1.append(list3)

len(listall1)
#How many elements does listAll2 have?

listall2 = []
listall2.extend(list1)
listall2.extend(list2)
listall2.extend(list3)

len(listall2)
len(list2)
#What is the average grade if all the courses have the same weight
from statistics import mean
average = mean(listall2)
average
avg = sum(listall2)/len(listall2)
avg
newList2 = [1,2,3,4,5]
newList3=[]
for a in newList2 :
  newList3.append(a*1.1)

newList3<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08140947752126367, 'fraction_numerical': 0.041312272174969626, 'mean_word_length': 6.099137931034483, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '518873', 'license': 'MIT', 'n_tokens_mistral': 567, 'n_tokens_neox': 545, 'n_words': 192, 'path': 'exercise1.ipynb', 'repo_name': 'reevutrprog/TRPROG', 'size': '1646'}