Difference between revisions of "2022 Paper 1 Revision Quiz"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
Line 1: Line 1:
 
<quiz display=simple>
 
<quiz display=simple>
 
 
{In Recursion, the part of the code which runs itself is called?
 
{In Recursion, the part of the code which runs itself is called?
 
|type="()"}
 
|type="()"}
Line 22: Line 21:
 
- Recursive Case.
 
- Recursive Case.
 
||Incorrect
 
||Incorrect
 +
 +
<syntaxhighlight lang=c#>
 +
public int Fact(int num)
 +
{
 +
  if (num == 0)
 +
      return 1;
 +
  else
 +
      return num * Fact(num-1);
 +
 +
}
 +
</syntaxhighlight>
  
 
</quiz>
 
</quiz>

Revision as of 10:16, 2 June 2022

1. In Recursion, the part of the code which runs itself is called?

General Case.
Correct
Base Case.
Incorrect
Repeating Case.
Incorrect
Recursive Case.
Incorrect

2. In Recursion, the condition which stops the recursive calls is called?

General Case.
Correct
Base Case.
Incorrect
Repeating Case.
Incorrect
Recursive Case.
Incorrect

Your score is 0 / 0