← All Epic Skills Assessment Flashcard Decks

Fictional Programming Language Logic Questions and Answers Flashcards

6 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 6 Fictional Programming Language Logic Questions and Answers flashcards as text
  1. XiLang: counter=0; FOR each item IN [10,20,30,40]: IF item>15: counter=counter+1. What is counter after execution?

    Answer: 3

    Items >15: 20, 30, 40. Three items pass the condition. counter=3.

  2. PhiScript: FUNC factorial(n): IF n<=1 RETURN 1 ELSE RETURN n * factorial(n-1). What is factorial(4)?

    Answer: 24

    factorial(4) = 4×3×2×1 = 24.

  3. SigmaCode rule: variables declared inside a BLOCK are local. BLOCK1: x=5; BLOCK2: x=10; END BLOCK2; PRINT x; END BLOCK1. What prints?

    Answer: 5

    BLOCK2's x is a local variable. After BLOCK2 ends, the x in scope is BLOCK1's x=5.

  4. In LambdaLang: FUNC apply(f, x) RETURN f(x). FUNC square(n) RETURN n*n. What does apply(square, 6) return?

    Answer: 36

    apply(square, 6) calls square(6) = 6×6 = 36.

  5. NuCode: array B = [2,4,6,8,10]. B.REVERSE(). What is B[1] after reversal?

    Answer: 8

    After reversing [2,4,6,8,10], the array becomes [10,8,6,4,2]. B[1]=8.

  6. OmegaScript: FUNC isEven(n) RETURN n MOD 2 = 0. FUNC countEvens(list): count=0; FOR x IN list: IF isEven(x): count++; RETURN count. What does countEvens([1,2,3,4,5,6]) return?

    Answer: 3

    Even numbers in [1,2,3,4,5,6]: 2,4,6 = 3 even numbers.