Python Programming : Advanced (Leaving Cert Computer Science): Quizzes

📚Quizzes
Python Programming : Advanced
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

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?

Member Discount

What discount does a 70-year-old receive in the e-commerce example?

Senior / Child Discount

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]?

9 pairs

In nested loops, what does the inner loop do?

Iterates for each outer loop value

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)?

25

Which keyword is used to define a function in Python?

def

What is recursion?

A function calling itself

What is the base case in a recursive function?

The condition to stop recursion

In the factorial example, what is 5!5! equal to?

5×4×3×2×15×4×3×2×1

Join 100,000+ Leaving Cert students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.