Python Programming : Advanced (Leaving Cert Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What is a nested conditional in Python?
What is a nested conditional in Python?
A conditional inside another conditional
In the discount example, what discount does a 45-year-old member receive?
In the discount example, what discount does a 45-year-old member receive?
Member Discount
What discount does a 70-year-old receive in the e-commerce example?
What discount does a 70-year-old receive in the e-commerce example?
Senior / Child Discount
What is a nested loop?
What is a nested loop?
A loop inside another loop
How many pairs are printed in the nested loop example with lists ['a','b','c'] and [1,2,3]?
How many pairs are printed in the nested loop example with lists ['a','b','c'] and [1,2,3]?
9 pairs
In nested loops, what does the inner loop do?
In nested loops, what does the inner loop do?
Iterates for each outer loop value
What is a key benefit of using functions?
What is a key benefit of using functions?
They make code reusable and modular
What does the square function return when called with square(5)?
What does the square function return when called with square(5)?
25
Which keyword is used to define a function in Python?
Which keyword is used to define a function in Python?
def
What is recursion?
What is recursion?
A function calling itself
What is the base case in a recursive function?
What is the base case in a recursive function?
The condition to stop recursion
