LIMITED TIME OFFER: 50% OFF OF PREMIUM WITH OUR ANNUAL PLAN (THAT'S $294 IN SAVINGS).
GET OFFER

Mission 331-2: my solution doesn't pass the system's check

Screen Link:
https://app.dataquest.io/m/331/python-data-analysis-basics/2/calculating-artist-ages

My Code:

ages = []
for row in moma:
    birth = row[3]
    date = row[6]
    if type(birth) == int:
        age = date - birth
    else:
        age = 0
    ages.append(age)
final_ages = []
for age in ages:
    if age > 20:
        final_age = age
    else:
        final_age = "Unknown"
    final_ages.append(final_age)

What I expected to happen:
I expected the solution to pass the system check

What actually happened:
it failed the system’s check

ages is longer than we expected.
final_ages is longer than we expected

I ran your code. It worked in my system without any problem.
ran

1 Like

wow, :astonished: so what could be wrong on my end? :confused:

Kindly refresh the screen or reset the code and try to run the code again. Let me know if this helps.

1 Like

Hey @pablajaspreet94,
thanks, I just tried that it worked! :smile:

1 Like

Thank you @pablajaspreet94 for your suggestion. I encountered the same issue and your suggestion helped me to solve my problem.

1 Like

Nope, still not working. Same solution as OP (@chalokwun). Tried refreshing and all but I’m getting the same error. This is really frustrating.