Python Programming: Advanced (Leaving Cert Computer Science): Quizzes
📚Quizzes
Practise the questions
10 questions from this quiz
ShowHide
Practise the questions
10 questions from this quiz
What is a nested conditional?
What is a nested conditional?
One conditional inside another
In nested conditionals, when does the inner condition run?
In nested conditionals, when does the inner condition run?
Only after the outer condition is met
How does the inner loop behave in nested loops?
How does the inner loop behave in nested loops?
Runs fully for each outer loop pass
What do f-strings do with variables inside curly braces?
What do f-strings do with variables inside curly braces?
Replace them with their values
What keyword is used to define a function?
What keyword is used to define a function?
def
How does 'return' differ from 'print'?
How does 'return' differ from 'print'?
return hands value back, print displays
What is recursion?
What is recursion?
A function calling itself
What happens without a base case in recursion?
What happens without a base case in recursion?
RecursionError from stack overflow
What is the base case in the factorial function?
What is the base case in the factorial function?
if n == 0, return 1
In recursion, what happens as calls go 'back up'?
In recursion, what happens as calls go 'back up'?
Each call returns result to one above
