(Unit 1): Computational Thinking and Programming Flashcards
What is a symbol?
In computing, symbols are characters with specific meanings:
- Arithmetic Symbols: +, -, *, / (math operations)
- Comparison Symbols: ==, !=, >, < (compare values)
- Logical Symbols: &&, ||, ! (logic operations: and, or, not)
- Assignment Symbols: = (assign values), += (add and assign)
- String Symbols: “ “ (defines text)
- Special Symbols: {}, [], () (group code, arrays, functions)
They help structure and control the behavior of code.
What is an assignment?
Giving a variable a value. Example: x = 5
What is a concatenation?
Joining two strings together. Example: “foot” + “ball” = “football”
What is a construct?
The building blocks in programming:
Sequence: Steps in order.
Selection: Choose between options (if/else).
Iteration: Repeat steps (loops).
What is a high level language?
Programming languages like Python that use words similar to everyday language.
What is an identifier?
It is a name for a variable or function.
What is an input?
Data we give to a program, like typing a word.
What is language independent?
Doesn’t depend on knowing a specific programming language. Example: pseudocode (simple steps, no specific code rules).
What is an output?
What the computer shows us, like text on the screen.
What is a pseudocode?
A simple, code-like way to describe how a program works, without focusing on exact rules.
What is a string?
Text data inside quotation marks. Example: “Hello”
What is a syntax?
The rules for writing code properly.
What is a variable?
A storage spot for data (like a box to keep values).
What is a variable declaration?
Telling the program you need a variable.
What are booleans?
True/false values or 0 and 1 (binary logic).
What are brackets?
( ) symbols to group code. Example: 2 * (3 + 4)
What is a condition?
A test that checks if something is true or false. Example: x > 5
What is a conditional statement?
Code that runs if a condition is true or false. Example: if/else
What is an else if statement?
Used when there are multiple conditions. Example: if, elseif, and else