Q2Single correct5 Marks13 Jul 2025Consider the flowchart shown below. Which of the following pseudocode is correct for the given flowchart?A``` Sum = 0 while (Pile 1 has more cards) { Pick a card X from Pile 1 Move X to Pile 2 while (X.Gender == M) { Sum = Sum + X.Maths } else } ```B``` Sum = 0 if (Pile 1 has more cards) { Pick a card X from Pile 1 Move X to Pile 2 if (X.Gender == M) { Sum = Sum + X.Maths } } ```C``` Sum = 0 while (Pile 1 has more cards) { Pick a card X from Pile 1 Move X to Pile 2 if (X.Gender == M) { Sum = Sum + X.Maths } } ```D``` Sum = 0 if (Pile 1 has more cards) { Pick a card X from Pile 1 Move X to Pile 2 while (X.Gender == M) { Sum = Sum + X.Maths } } ```