1/38
Key vocabulary for understanding variables, data types, expressions, functions, and related concepts in introductory programming with Coral.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Variable
Named storage location that holds a value which can change during program execution.
Assignment Statement
Uses = to store the value of a right-side expression into a left-side variable (e.g., x = 5).
Variable Declaration
Statement that introduces a new variable and specifies its data type (e.g., integer userAge).
Expression
Combination of variables, literals, operators, or function calls that evaluates to a single value.
Literal
Explicit value written in code, such as 2, -5, or 3.14.
Operator
Symbol that performs a built-in computation like +, -, *, /, or %.
Addition Operator (+)
Returns the sum of two operands (x + y).
Subtraction Operator (-)
Performs subtraction or, as unary minus, negation (-x).
Multiplication Operator (*)
Returns the product of two operands (x * y).
Division Operator (/)
Performs division; result type depends on operand types (integer or floating-point).
Modulo Operator (%)
Returns the remainder of integer division (e.g., 23 % 10 → 3).
Precedence Rules
Standard order of evaluation: parentheses, unary -, *, /, then + and - (left to right for ties).
Identifier
Programmer-defined name for variables, functions, etc.; must start with a letter and be case-sensitive.
Reserved Word (Keyword)
Word that is part of the language syntax and cannot be used as an identifier (e.g., integer, Get).
camelCase
Naming style that capitalizes each word except the first (e.g., numApples).
Underscore_separated
Naming style that uses lowercase words separated by underscores (e.g., num_apples).
Integer
Whole-number data type; Coral range ≈ –2 billion to +2 billion.
Floating-Point Number (float)
Real-number data type able to store fractional values (e.g., 98.6).
Boolean
Data type with exactly two values: true or false.
Array
Ordered list of items of a given data type (e.g., array of integers).
String
Sequence of characters like "Hello"; printed directly in Coral via Put.
Unary Minus
Operator that negates a single operand (-x).
Integer Division
/ with two integer operands; fractional part is discarded (10 / 4 → 2).
Floating-Point Division
/ where at least one operand is float; fraction is preserved (10 / 4.0 → 2.5).
Divide-by-Zero Error
Runtime error for integer / or % when divisor is 0; terminates program.
Type Conversion
Changing a value from one data type to another.
Implicit Conversion
Automatic conversion performed by the language, e.g., int to float in mixed arithmetic.
Type Casting
Explicit programmer-requested conversion, often via multiplying by 1.0 or other cast syntax.
Constant
Named value that cannot change during execution; often written in ALLCAPS (e.g., SOUNDSPEED).
Function
Reusable group of statements invoked by name that may return a value.
Function Call
Execution of a function using its name followed by arguments in parentheses.
Argument
Value or expression passed into a function call.
SquareRoot(x)
Built-in Coral function that returns the square root of x.
RaiseToPower(x, y)
Built-in Coral function that returns x raised to the y power.
AbsoluteValue(x)
Built-in Coral function that returns the non-negative magnitude of x.
RandomNumber(low, high)
Returns a pseudo-random integer between low and high inclusive.
SeedRandomNumbers(val)
Initializes the pseudo-random generator with a specific seed value.
Pseudo-Random
Sequence that appears random but is generated deterministically from a seed.
Incremental Development
Process of writing, compiling, and testing small pieces of code repeatedly.