Programming Module Flashcards
What is binary
0s and 1s, 0 = Off, 1 = On
Simplifies data storage, and processing in computers
What is hexadecimal
0-9 normal decimal
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15
What is control structures
Guide the flow of program, ensuring logical execution
What is sequence in control structures
Code runs line by line, one after the other
Straightforward, step-by-step processes
What is selection in control structures
Conditional statements (if, elif, else)
Decisions based on conditions
Choose paths based on criteria
What is iteration in control structures
Loops (for, while)
Execution of code repeatedly, based on given task
What is modular coding
Breaking down program into separate, manageable, sections into functions / modules
What is the benefits of modular coding
Readability / Maintainability of code
Promotes code reusability, allows for easier debugging & testing
Allows for collaboration, as can assign members certain roles
What is the best practices of modular coding
Use meaningful names: Name functions & variables clearly
Keep functions short: Each function should perform single task
Reuse functions: Use functions to avoid code duplication
What are functions
Block of code designed to perform particular tasks
Reduces code that isn’t needed
def function_name (parameters):
What are parameters in functions
Variables listed in parentheses in function definition
Placeholders as values passed to function
What are arguments in functions
Actual values / variables passed to functions when called
What is local scope in variables
Variables declared inside function
Accessible only within function
Use to prevent interference between functions
What is global scope in variables
Variables declared outside any function
Accessible throughout program
Minimise global variables, avoid unintentional modifications
What are data types
Store & manipulate data
Essential for creating variables & constants in code
What are integers
Whole number without decimal, efficient memory, fast processing
What are floats
Number that includes decimal point
Requires more storage than integers
What are strings
Sequence of characters enclosed in quotes, easy manipulation & concatenation
What are booleans
Either true or false, enhances decision-making in code
What is pseudocode
High-level representation of algorithms in a detailed yet readable description
What is the investigation phase in the framework for development
Identify & Understand the problem
Specify what the software needs to do to solve the problem
Create a timeline for the development process
What is the design phase in the framework for development
Design data structures, how data will be organised, stored, accessed
Design and test algorithms that form software
What is the evaluate phase in the framework for development
User Acceptance testing, ensure software meets needs and is user-friendly
Developer retrospective, development team reviews process, identifies success and areas for improvement
What is the develop phase in the framework for development
Develop & Debug the code, according to the designs in a programming language
Perform unit testing, to ensure individual components / functions of software work as intended
What is Validate Input Before Processing in good programming practices
Prevents errors, ensure game behaves as expected
What is Use Meaningful Variable Names in good programming practices
Enhances code debugging
What is Use of Constants for Readability and Maintenance in good programming practices
Makes easier to update values and understand the code
What is Use of Comments to Explain Code in good programming practices
Aid understanding, especially for complex logic
What is Appropriate Use of Standard Control Structures in good programing practices
Appropriate managing of the flow of a program