Python Programming: Advanced (Leaving Cert Computer Science): Flashcards
📚Flashcards
Practise the cards
10 cards from this deck
ShowHide
Practise the cards
10 cards from this deck
Nested conditionals
Nested conditionals
One conditional inside another; hierarchical checking
Nested loops
Nested loops
One loop inside another; inner runs fully per outer pass
f-strings in Python
f-strings in Python
Formatted strings (f"...") with vars in {} replaced by values
Purpose of functions
Purpose of functions
Encapsulate code into reusable blocks for modularity
Keyword to define a function
Keyword to define a function
def
return vs print in functions
return vs print in functions
return hands value to caller; print displays on screen
Recursion
Recursion
Function calls itself to solve smaller instances of same problem
Base case in recursion
Base case in recursion
Condition where function stops calling itself
Recursive case
Recursive case
Function calls itself with smaller/simpler input
Python error for stack overflow
Python error for stack overflow
RecursionError
