Your Cart
Loading

Problem #1 Subject: Data Mining

On Sale
$25.00
$25.00
Added to cart



Modules: re, pathlib


Filename: hw06_01.py


WORK


To achieve the task of data mining from a zipped file, the program begins by


unzipping the provided file using the 'unzip_file' function. Following this, the


number of subdirectories within the 'data' directory is counted using the

'count_subdirectories' function. Then, for each subdirectory, the program iterates

through its files, counting the number of files in each subdirectory using the


'count_files_in_subdirectory' function. Within this iteration, the


'find_five_digit_numbers' function is used to locate and extract all five-digit


numbers surrounded by dollar signs ('$') from each file. These numbers are


accumulated in a list. Once all files have been processed, the total number of files


and the total number of five-digit numbers found are printed. Finally, the sum of


these five-digit numbers is calculated using the 'sum_five_digit_numbers' function,


and the result is displayed.


OUTPUT


DATA MINING!!!


Number of subdirectories: 50


Number of files in data/rawiplzpi: 20


Number of files in data/soabjrhlol: 20


Number of files in data/kcqnhvlsx: 20

Number of files in data/ogrdqhgv: 20

Number of files in data/ewrdadpbfij: 20


Number of files in data/flwzhwqq: 20


Number of files in data/qzecubqtsg: 20


Number of files in data/qpcnzgxrntl: 20

Number of files in data/frhqlednfid: 20

Number of files in data/lqjtok: 20


Number of files in data/lrgtwkgnh: 20


Number of files in data/lldjdnefi: 20

Number of files in data/mjanmpa: 20

Number of files in data/kfwgsbupnnc: 20


Number of files in data/gulaksy: 20


Number of files in data/eukfmzthr: 20


Number of files in data/hbucfrcmpdtn: 20

Number of files in data/gaazbtxmzv: 20

Number of files in data/xddnovkveccz: 20


Number of files in data/rfhnwluk: 20


Number of files in data/yurfut: 20


Number of files in data/glugtlvqml: 20

Number of files in data/dpxrqorv: 20

Number of files in data/urivqszh: 20


Number of files in data/wolqauqeyr: 20


Number of files in data/malanmeydfse: 20


Number of files in data/qgjamvnqb: 20

Number of files in data/aywyboo: 20

Number of files in data/sctmwkqymfwr: 20


Number of files in data/rytkaanki: 20

Number of files in data/dsznbtqgg: 20

Number of files in data/hykpkfdqpnu: 20


Number of files in data/ddtuptgmm: 20


Number of files in data/cutshn: 20


Number of files in data/mqxmkemiolb: 20

Number of files in data/ryjztmtrdh: 20

Number of files in data/wzqyeac: 20


Number of files in data/ualhdniwsp: 20


Number of files in data/vireyzhfuoo: 20

Number of files in data/eersulmimg: 20

Number of files in data/tudquqly: 20


Number of files in data/zrfivzy: 20


Number of files in data/auiuyfsjj: 20


Number of files in data/zjfdypetesh: 20

Number of files in data/tteamqxpqns: 20

Number of files in data/cnyftz: 20


Number of files in data/bbncghlit: 20


Number of files in data/nibbhaohqibo: 20


Number of files in data/hcnkdfgktx: 20

Number of files in data/uyfjyeoixe: 20


Total number of files: 1000


Total number of five-digit numbers found: 4745


Sum of those numbers: 235762121


You will get a ZIP (2MB) file