Which arithmetic operator is used to calculate the remainder after an integer division in pseudocode?
Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)
Operators:練習問題
その場で採点される選択問題 5 問と、解説つきの記述問題 4 問。すべて「Operators」からの出題です。
Consider the following expression:
\(result = (12 + 4) * 2 ** 3\)
What is the value of \(result\)?
In a logical test, which combination of Boolean values for \(A\), \(B\), and \(C\) will make the following expression evaluate to True?
\((A \text{ AND } B) \text{ OR } (\text{NOT } C)\)
Evaluate the following logic statement where \(P = True\) and \(Q = False\):
\(\text{NOT } (P \text{ AND } Q) \text{ AND } (P \text{ OR } Q)\)
What is the result of the following integer division and modulus operations in pseudocode?
\(x = 17 \text{ // } 5\)
\(y = 17 \text{ MOD } 5\)
State the value of result after the following code is executed:
result = 15 % 4
まず自分で答えを書いてから、解説と照らし合わせましょう。
Evaluate the following logical expression where A = True and B = False:
NOT (A AND B)
まず自分で答えを書いてから、解説と照らし合わせましょう。
Determine the final value of x after the following operations:
x = 10
y = 3
x = x // y ** 2
まず自分で答えを書いてから、解説と照らし合わせましょう。
A developer is creating a login system. The system must check if the username is "admin" AND if the login attempts are less than 3.
(a) Write a boolean expression for this selection criteria using the variables user and attempts.
(b) If user = "admin" and attempts = 3, determine the final evaluation (True/False) of the expression.
(c) Explain the effect of changing the AND operator to an OR operator in this specific logic.
まず自分で答えを書いてから、解説と照らし合わせましょう。
※ thinkaのコンテンツはAIにより生成されているため、内容が正確でない場合があります。補助教材としてご使用いただき、公式の教材と合わせてご確認ください。
模範解答は見ました。次はあなたの答案を採点します。
このページは良い答案の形を示せますが、あなたの答案に何が足りないかは教えられません。thinka は実際の採点基準に沿って記述答案を約 15 秒で採点します。
同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。
練習を始める