Procedural Programming (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
What is procedural programming?
What is procedural programming?
Programming paradigm based on structured, sequential steps (procedures/functions)
What are variables?
What are variables?
Named storage locations holding values that can change during execution
What are constants?
What are constants?
Named storage locations holding values that remain unchanged throughout the program
Sequence in procedural programming
Sequence in procedural programming
Code executed line-by-line in the order written
Selection in procedural programming
Selection in procedural programming
Choosing different paths based on conditions (if-else statements)
Iteration in procedural programming
Iteration in procedural programming
Repeating code blocks until a condition is met (loops)
Difference: functions vs procedures
Difference: functions vs procedures
Functions return a value; procedures don't return a value
What is string handling?
What is string handling?
Manipulation of text-based data (combining, slicing, searching)
File handling purpose
File handling purpose
Reading from and writing to files for persistent data storage
Boolean operators in Python
Boolean operators in Python
and, or, not
Arithmetic operators in Python
Arithmetic operators in Python
+, -, *, /, // (int div), % (mod), ** (exp)
Purpose of 'global' keyword in Python
Purpose of 'global' keyword in Python
To modify a global variable within a function
