Question: IN PYTHON! 3. Screw Nut Pairs Let's assume you are maintaining a portion of an airplane and in the midst of your work, your technician

IN PYTHON!
3. Screw Nut Pairs Let's assume you are maintaining a portion of an airplane and in the midst of your work, your technician has run out of screws. You request for some additional screws and nuts from your hardware department and the hardware department sends you a large shipment of screws and nuts. The shipment comes and it is in all shapes and sizes, but your technician says that he can perhaps try to differentiate the different screws by their weight. As the shipment is huge, he asks for your help. He says that: if the screw has weight 3, it belongs to Screw A. if the screw has weight 6, it belongs to Screw B. if the screw has weight 12, it belongs to Screw C. For all other screws, please discard them. if the nut has weight 1, it belongs to Nut A. if the nut has weight 4, it belongs to Nut B. if the nut has weight 8, it belongs to Nut C. For all other nuts, please discard them. You are now provided with two lists of all the weights of the screws or nuts: [3, 6, 12, 3, 6, 12] [1, 4, 8, 3,4] Your task is to return a list saying the index of the pairs of Screw and Nut Set A. Screw and Nut Set B, Screw and Nut Set C. 0,0 1,1 2,2 4,4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
