Suppose lists A and B are lists with same length and have only integer items. define the function question_3 that does the following: if Ali] is even and B[i] is odd swap A[i] and B[i), do nothing...


Write a python code


Suppose lists A and B are lists with same length and have only integer items. define the<br>function question_3 that does the following:<br>if Ali] is even and B[i] is odd swap A[i] and B[i),<br>do nothing otherwise.<br>Example:<br>Suppose A =[2, 4, 5, 8, 9]<br>and<br>B= [13, 14, 16, 21, 25]<br>after calling the question_3 function as following<br>question_3(A,B);<br>the list A will be [13, 4, 5, 21, 9]<br>and list B will be [2, 14, 16, 8, 25]<br>

Extracted text: Suppose lists A and B are lists with same length and have only integer items. define the function question_3 that does the following: if Ali] is even and B[i] is odd swap A[i] and B[i), do nothing otherwise. Example: Suppose A =[2, 4, 5, 8, 9] and B= [13, 14, 16, 21, 25] after calling the question_3 function as following question_3(A,B); the list A will be [13, 4, 5, 21, 9] and list B will be [2, 14, 16, 8, 25]

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here