Answer:
Following are the code in the python language
if firstInClass.startswith("Pat") and secondInClass.startswith("Wei"): #check the #condition
firstInClass, secondInClass = secondInClass, firstInClass #swap value
Explanation:
Following are the description of statement
- Firstly we check the condition the string start with pat with the string start with the Wei string along with the and operator with them .
- If the condition is true then it executed the block of if statement means executed the statement inside the if block .It means it swap the statement without assigning the value .