Question
using rebrickable API, Retrieving Parts for Lego Sets.For each set returned inparta,use the API to get a list of all inventory parts in that set.Since
using rebrickable API,
Retrieving Parts for Lego Sets.For each set returned inparta,use the API to get a list of all inventory parts in that set.Since we are only interested in the parts that are used most frequently in a set, attempt to retrieve up to but no more than the top 20 parts for each set.For each part,you will need its:
- part color
- part quantity
- part name
- part number
To address the fact that some parts for a set have the same part_num, construct a unique id by concatenating the part number and color.e.g.,A part having a part_num = "3203" and a color "C9C9C9" would be concatenated into an id = "3203_C9C9C9".You will use this part id as the node id when you add it to the graph in part c.
I think we should use dictionaries and looping, but not sure how to.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started