Code Review Request: The Frida Kahlo Exhibition

Hello, this is my first post on the forums. I’m in Canada and currently 35% through the Data and Programming Foundations for AI course. I’m at the part where they asked me to put up a project to be peer reviewed. I’ve completed the Frida Kahlo Project and I think I did alright but if anyone could review what I did and give me some notes I would very much appreciate it.

# Step 1: Create a list of paintings paintings = ["The Two Fridas", "My Dress Hangs Here", "Tree of Hope", "Self Portrait With Monkeys"] # Step 2: Create a list of dates dates = [1939, 1933, 1946, 1940] # Step 3: Combine paintings and dates paintings = list(zip(paintings, dates)) # Step 4: Append new entries to paintings paintings.append(("The Broken Column", 1944)) paintings.append(("The Wounded Deer", 1946)) paintings.append(("Me and My Doll", 1937)) print(paintings) # Step 5: Measure length of paintings total_paintings = len(paintings) # Step 6: Create a listed range equal to length of paintings audio_tour_number = list(range(1, total_paintings + 1)) print(audio_tour_number) # Step 7: Create a master list of all lists master_list = list(zip(audio_tour_number, paintings)) # Step 8: Print master_list print(master_list)

Can always print(len(paintings), then when creating range use range(1, 8).

Hi there. I’m also about 30% of the way through the Data and Programming Foundations for AI course. I would be happy to provide some feedback on code.

The code successfully prints out the combined list of the paintings and dates and managed to include the new paintings in the list. No error messages appeared.

I think for the list of the audio tour number, it would have been easier to have numbers instead for the range, eg, range(1, 8) so that you have a list from 1 to 7.

Otherwise, the code was executed well. The comments are also clear and are helpful in directing someone who has not seen the code before.

Hope that helps.

Looks great, super similar to mine! I’m in Birmingham and I’m currently 25ish% done with the Data Science Analytics career path, working on this same project! The only major thing I did differently was in step 5, not assigning the length to a variable. I just printed the number so that I knew it, which made my range say “audio_tour_number = list(range(1,8))”. I’m still so new so I don’t know if this was actually a helpful review, haha. But the code seems to work and does pretty much what mine does too!