<jupyter_start><jupyter_text>***First task***<jupyter_code>import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    price = [] # for price only
    for x in readCSV:
        price.append(x[0])
    print(price)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    maintenancecost = [] # for maintenancecost only
    for x in readCSV:
        maintenancecost.append(x[1])
    print(maintenancecost)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    numberofdoors = [] # for numberofdoors only
    for x in readCSV:
        numberofdoors.append(x[2])
    print(numberofdoors)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    numberofpassengers = []# for numberofpassengers only
    for x in readCSV:
        numberofpassengers.append(x[3])
    print(numberofpassengers)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    luggagecapacity = [] # for luggagecapacity only
    for x in readCSV:
        luggagecapacity.append(x[4])
    print(luggagecapacity)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    safetyrating = [] # for safetyrating only
    for x in readCSV:
        safetyrating.append(x[5])
    print(safetyrating)
import csv
with open('desktop/cars-sample35.txt') as csvfile:
    readCSV = csv.reader(csvfile)
    classification = [] # for classification only
    for x in readCSV:
        classification.append(x[6])
    print(classification)<jupyter_output>['unacc', 'acc', 'unacc', 'acc', 'unacc', 'unacc', 'vgood', 'unacc', 'unacc', 'unacc', 'unacc', 'acc', 'acc', 'unacc', 'unacc', 'unacc', 'unacc', 'acc', 'vgood', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'unacc', 'acc', 'unacc', 'unacc', 'unacc', 'unacc']<jupyter_text>***Second Task***<jupyter_code>pricerating = [] #create new list
for x in range(len(price)): #iterates each value from price list
    if price[x]=='med': 
        pricerating.append(x)
print(pricerating)<jupyter_output>[6, 16, 20, 23, 26, 29]<jupyter_text>***Third Task***<jupyter_code>number= [] #create new list
for x in pricerating:
    number.append(numberofpassengers[x]) #add numberofpassengers with price = med
print(number)<jupyter_output>['more', '2', '2', '2', '4', '2']<jupyter_text>***Fourth Task***<jupyter_code>pricehighmaintlow = [] #create new list of maintenancecost=low and price=high
for x in range(len(price)):
    if price[x]=='high' and maintenancecost[x]!='low':
        pricehighmaintlow.append(x)
print(pricehighmaintlow)<jupyter_output>[0, 1, 2, 27, 31]<jupyter_text>***Fifth Task***<jupyter_code>luggagebigtwodoors = [] #create new list of numberofdoors=2 and luggage capacity=big
for x in range(len(numberofdoors)):
    if numberofdoors[x]=='2' and luggagecapacity[x]=='big':
        luggagebigtwodoors.append(x)
print(luggagebigtwodoors)<jupyter_output>[3, 12, 19, 23]<jupyter_text>***Last Task***<jupyter_code>doorsvalue =[] #create new list of doorsvalue
for x in numberofdoors:
    if x!='5more':
        doorsvalue.append(int(x))
    else:
        doorsvalue.append(int('5'))
average = sum(doorsvalue)/len(doorsvalue) #calculate average number of doors
print(doorsvalue)
print('average = ' + str(average))<jupyter_output>[2, 4, 4, 2, 3, 2, 4, 3, 2, 4, 2, 4, 2, 3, 5, 2, 2, 5, 3, 2, 4, 2, 5, 2, 4, 3, 3, 3, 5, 5, 3, 5, 5, 4, 3]
average = 3.3142857142857145
{'fraction_non_alphanumeric': 0.15628507295173963, 'fraction_numerical': 0.030022446689113354, 'mean_word_length': 4.694888178913738, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '213404', 'license': 'MIT', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1282, 'n_words': 309, 'path': 'R_Li_W2_assn.ipynb', 'repo_name': 'ak47m1a1/DBDA-python', 'size': '3564'}