Brief
Represent a receipt with a Python dictionary and read its fields without inventing missing ones.
Mara and Imani lay out R31, which says “2 parts received, source warehouse,” and R32, which says “1 part checked” with no source written. Voss adds 2 and 1 and announces three parts released. Create a representation Noor can reread tomorrow before that claim spreads.
Your mission
- Write a dictionary for R31 with ID, action, quantity, and source, and one for R32 with only known fields.
- Put both in a
receiptslist and givereceipts[0]['quantity']. - Ask for R32's source with
get()and explain the result. - Write an honest sentence keeping “received,” “checked,” and “released” apart.
How to check your work
- Each dictionary describes one receipt with correct action and quantity.
- You get
2for the first receipt's quantity. - R32's missing source stays absent;
get('source')givesNone. - You do not add different actions to invent three releases.