Note AcademyNote Academy

Computer Science · Oct / Nov 2023 · Paper 2 HL · Question 6

Adapt for 2027Writing functions with loops over an array fits B2.3 and B2.2, written in Python or Java; the hardware question at the end is not really on the syllabus.

IBCS

As printed in the paper

The question as text

6. You are going to visit Cattery5S, where you will have the opportunity to see eight cats. You realize that the number of permutations for eight cats is 8! (8 × 7 × 6 × 5 × 4 × 3 × 2 × 1) or 40 320. You need to create a function, FACTORIAL, that accepts the number of cats, N, and returns the factorial of that number.

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 6(a)[2]

  • 6(b)[2]

  • 6(c)[6]

  • 6(d)[2]

  • 6(e)[4]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.