Python Programming : Advanced (Leaving Cert Computer Science): Flashcards
📚Flashcards
Practise the cards
11 cards from this deck
ShowHide
Practise the cards
11 cards from this deck
Nested conditionals
Nested conditionals
One conditional statement inside another
Purpose of nested conditionals
Purpose of nested conditionals
Check multiple conditions hierarchically
Nested loops
Nested loops
One loop inside another loop
Functions in Python
Functions in Python
Reusable blocks of code that encapsulate operations
Benefits of functions
Benefits of functions
Makes code modular, readable, easier to maintain
Keyword to define a function in Python
Keyword to define a function in Python
def
Recursion
Recursion
A function calls itself to solve smaller instances of same problem
Two components of recursive function
Two components of recursive function
Base case and recursive case
Base case in recursion
Base case in recursion
Condition where function stops calling itself
Recursive case
Recursive case
Where function calls itself with simpler or smaller input
Factorial of
Factorial of
Product of all positive integers
