表計算ソフトを用いて,二つの科目 X,Y の点数を評価して合否を判定する。それぞれの点数はワークシートのセル A2,B2に入力する。合格判定条件 (1) 又は (2) に該当するときはセル C2に“合格”,それ以外のときは“不合格”を表示する。セル C2に入力する式はどれか。 〔合格判定条件〕 (1) 科目 X と科目 Y の合計が120点以上である。 (2) 科目 X 又は科目 Y のうち,少なくとも一つが100点である。
| A | B | C | |
|---|---|---|---|
| 1 | 科目 X | 科目 Y | 合否 |
| 2 | 50 | 80 | 合格 |
This question's explanation and your answers so far.
表計算ソフトを用いて,二つの科目 X,Y の点数を評価して合否を判定する。それぞれの点数はワークシートのセル A2,B2に入力する。合格判定条件 (1) 又は (2) に該当するときはセル C2に“合格”,それ以外のときは“不合格”を表示する。セル C2に入力する式はどれか。 〔合格判定条件〕 (1) 科目 X と科目 Y の合計が120点以上である。 (2) 科目 X 又は科目 Y のうち,少なくとも一つが100点である。
| A | B | C | |
|---|---|---|---|
| 1 | 科目 X | 科目 Y | 合否 |
| 2 | 50 | 80 | 合格 |
Uses AND (logical AND). AND is true only when all three conditions are true, so it requires “all to be satisfied”. This question's condition is “meeting any one is enough to pass”, so it is inappropriate. In the example A2=50, B2=80, both A2=100 and B2=100 are false, so AND is false → “Fail” is displayed, which contradicts “Pass” in the table.
In addition to the same error as ア of using AND (logical AND), the display order is also reversed: “Fail” when true and “Pass” when false. Both the logical combination and the display are wrong — a double error.
正解 The pass conditions are “(1) the total of subjects X and Y is 120 points or more” or “(2) at least one of subject X or subject Y is 100 points”, and meeting either one is enough to pass. In other words, if any one of the three conditions (A2+B2)≧120, A2=100, B2=100 is true, the result is a pass, so the logical function that bundles them is OR (logical OR). In addition, the IF statement must display “Pass” when the OR is true and “Fail” when it is false. The option that satisfies both points is ウ, which uses OR and places “Pass” on the true side. For example, with A2=50 and B2=80 the total is 130, which is 120 or more, so the first condition is true, the OR is true → “Pass” is displayed, matching “Pass” in cell C2 of the table.
The logical function OR (logical OR) is correct, but the IF display order is reversed: it displays “Fail” when the OR is true and “Pass” when it is false. It shows “Fail” precisely when the condition is met. In the example A2=50, B2=80, the OR is true → “Fail” is displayed, which contradicts “Pass” in the table.