Which arithmetic operator is used to calculate the remainder after an integer division in pseudocode?
Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)
Operators: Practice Questions
5 multiple-choice questions marked as you go, and 4 written questions with worked solutions. All on 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
Write your answer out first, then check it against the worked solution.
Evaluate the following logical expression where A = True and B = False:
NOT (A AND B)
Write your answer out first, then check it against the worked solution.
Determine the final value of x after the following operations:
x = 10
y = 3
x = x // y ** 2
Write your answer out first, then check it against the worked solution.
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.
Write your answer out first, then check it against the worked solution.
* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.
You've seen the model answer. Now get yours marked.
This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.
Want more questions like these? Get a fresh set on this topic, graded as you go.
Practice More