Fictional Programming Language Logic Flashcards
7 cards from real Epic Skills Assessment practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Fictional Programming Language Logic flashcards as text
In FictoScript, what is the output of `let y := 5; y := y * 2; print(y)`?
Answer: 10
`let` in FictoScript declares a mutable variable, so reassignment is allowed, and y becomes 10.
A FictoScript `match` expression that has no matching case and no `default` branch will:
Answer: Throw a MatchError at runtime
Without a `default` branch, a FictoScript `match` that finds no matching case raises a MatchError.
In FictoScript, what does the `@pure` annotation before a function declaration guarantee?
Answer: The function has no side effects and always returns the same output for the same input
`@pure` marks a function as referentially transparent — no side effects and deterministic output.
Which FictoScript scope rule applies to variables declared inside a `loop` block?
Answer: They persist across iterations but are destroyed when the loop ends
Loop-block variables in FictoScript persist across iterations but go out of scope when the loop terminates.
In FictoScript, the `fold` function applied to a list processes it by:
Answer: Accumulating a single value by applying a binary function from left to right
`fold` reduces a list to a single accumulated result using a binary function applied sequentially.
FictoScript's `unless` keyword is best described as:
Answer: An inverted conditional that executes when the condition is false
`unless condition` executes its block only when the condition evaluates to false, opposite of `when`.
What happens in FictoScript when you access index 5 of a list that only has 3 elements?
Answer: Throws an IndexOutOfRange error
FictoScript raises an IndexOutOfRange error when accessing an index beyond the list's bounds.