logo

AQA A-Level Computer Science practice

Let f(x) = x + 2 and g(y) = y^3. Which expression represents g ○ f?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Functional programming paradigm

Exam-style question

Try this first

Let f(x) = x + 2 and g(y) = y^3. Which expression represents g ○ f?.

  1. A.x + 2^3
  2. B.(x + 2)^3
  3. C.x^3 + 2
  4. D.(x^3 + 2)^3

Answer and explanation

Concise answer

(x + 2)^3

Why this is correct

First apply f to x, giving x + 2. Then apply g to this result, giving (x + 2)^3.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions