Compsci 101, Find Big Files
Questions about FileVisit.py
Sign in to Google to save your progress. Learn more
FileVisit code
def bigfiles(dirname,min_size):
    large = []

    for sub in os.listdir(dirname):
        subpath = os.path.join(dirname,sub)
        if os.path.isdir(subpath):
            subs = bigfiles(subpath,min_size)
            large.extend(subs)
        else:
            size = os.path.getsize(subpath)
            if size > min_size:
                large.append((subpath,size))
    return large


A list is returned by bigfiles, Which lines add elements to the list being returned?
Check each line that adds elements to the list
Which line determines if an element of a folder is a directory?
Choose one
Clear selection
Which best describes the outer for loop in the function?
Choose one
Clear selection
Names and Netids below
Name(s)
netid
netid
netid
netid
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy