Compsci 101, Debug 1-sizes
This exercise is for collaborative work during class. Do not fill out early!
Sign in to Google to save your progress. Learn more
Consider the python code. The function sizes has a parameter named words that is a list of strings. This function returns a list of the sizes of each string. For example, sizes(['This', 'is', 'a', 'test']) should return the list     [4, 2, 1, 4]
def sizes(words):
    nums = [ ]
    for w in words:
        nums = len(w)
    return nums

Explain why it doesn't work and how to fix it. *
Names and Netids below
Names (comma separated) *
netid *
netid (partner)
netid (partner)
netid (partner)
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