1/72
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Purpose of a variable: To store data that can be used and changed during program execution
How to save a value to a variable: Use an assignment statement, e.g., x = 5
Programming expression: A combination of variables, values, and operators that computes a value, e.g., a + b * 2.
Identifier: A name used to identify a variable, function, or other entity in code
Valid identifier: Must start with a letter or underscore, followed by letters, digits, or underscores; cannot be a reserved word.
Literal: A fixed value written directly in code, like 5, "hello", or 3.14
Operator: A symbol that performs an operation on one or more operands, e.g., +, -, *, /.
Precedence rules: Determine the order in which operations are performed; e.g., multiplication/division before addition/subtraction.
Integer vs. float: An Integer is a whole number; a float is a number with a decimal point.
Dividing two integers: Result is an integer in some languages (integer division), or a float in others (true division). Integer and float division yield a float
Dividing a nonzero float by zero: Results in infinity or an error, depending on the language.
Convert an item’s type: Use type conversion functions, e.g., int("5") or float(3)
Modulo operator: Returns the remainder after division, e.g., 7 % 3 is 1.
Variable vs. constant: A Variable can change value; a constant cannot.
How an array works: Stores multiple values in a single variable, accessed by index.
Index reference: Refers to the position of an item in an array, starting at 0 in most languages.
Purpose of data types: Define the kind of data (integer, float, string, etc.) and what operations can be performed.
Compiled vs. interpreted language: Compiled languages are translated to machine code before running; interpreted languages are run line-by-line by an interpreter.
Compiled languages: C, C++, Java (to bytecode), Go.
Interpreted languages: Python, JavaScript, Ruby.
Statically vs. dynamically typed: Statically typed languages require variable types at compile time; dynamically typed languages determine types at runtime.
Statically typed languages: C, Java.
Dynamically typed languages: Python, JavaScript.
Object-oriented vs. non-object-oriented: Object-oriented languages use objects and classes; non-object-oriented do not.
Object-oriented languages: Java, Python, C++.
Not object-oriented: C, older BASIC.
Markup vs. programming/scripting language: Markup languages (such as HTML) describe the structure and presentation; programming/scripting languages perform computations and implement logic.
Programming library: A collection of pre-written code for common tasks
Why use libraries: To save time and avoid rewriting code for common functions
Libraries compiled or precompiled: Can be either; some are compiled, some are precompiled, and some are interpreted
Uses Programming Elements (20%)Functions & Control Structures
Branch vs. loop: Branch (if/else) chooses between actions; loop repeats actions.
If-else branch: Executes one block if the condition is true, another if false.
Equality operator: Checks if two values are equal (==); works for most data types, but behavior may vary (e.g., floats).
Four relational operators:
Three logical operators: and, or, not.
Precedence rules: Logical NOT > AND > OR; arithmetic before comparison.
Infinite loop: Created when the loop condition never becomes false, e.g., while True:.
Sentinel value: A Special value that signals the end of input or a loop.
Three parts of a loop: Initialization, condition, and update.
While vs. do/while loop: While checks the condition before the loop; do/while checks after (runs at least once).
Control structure guaranteed to run once: Do/while loop.
Loop for unknown iterations: While loop.
Loop for known iterations: For loop.
Function: A named block of code that performs a task.
Why functions are useful: Organize code, avoid repetition, improve readability.
Function call: Executes the function.
Parameters and arguments: Parameters are variables in a function definition; arguments are values passed in.
Define but don’t call the function: Code is not executed.
Return statement: Sends a value back from a function.
Explains Logic and Outcome of Algorithms (40%)Software Design, Algorithms, UML
Binary search: Efficiently finds an item in a sorted list by repeatedly dividing the search interval in half.
Linear search: Checks each item in a list sequentially until the item is found or the end of the list is reached.
SDLC: Software Development Life Cycle; a process for developing software.
Four phases of SDLC: Analysis, Design, Implementation, Testing.
Activities in each phase:
Analysis: Gather requirements.
Design: Plan solution, create diagrams.
Implementation: Write code.
Testing: Verify and validate the solution.
Phase for writing code: Implementation.
Waterfall vs. Agile: Waterfall is sequential, while Agile is iterative and flexible.
UML: Universal Modeling Language, a standard way to visualize system design.
Structural UML diagrams: Class, object, component, deployment diagrams.
Behavioral UML diagrams: Use case, sequence, activity, state diagrams.
Activity diagrams: Show workflows of stepwise activities.
UML diagrams in analysis: Use case, activity.
UML diagrams in design: Class, sequence.
UML diagrams in implementation: Component, deployment.
UML diagrams in testing: Activity, sequence.
Use case diagram: Shows the system’s functional requirements and interactions.
Class diagram: Shows classes, attributes, methods, and relationships.
Sequence diagram: Shows object interactions in time sequence.