First 50 of 190 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Programming, object modelling and software development
Why learn an overview of programming language paradigms/families in WI?
- To choose languages/tools appropriately and understand how solutions are expressed Correct answer.
- Because only one language exists worldwide
- Because languages replace the need for algorithms
- Because Vorabhinweise ban all programming
Explanation
Schwerpunkt includes Überblick über bekannte Programmiersprachen and Verfahren zur Programmentwicklung-conceptual orientation, not product training alone.
Question 2Programming, object modelling and software development
Integer vs floating-point choice for counting items in stock should prefer…
- Integer counts for discrete items; be cautious with binary floats for money Correct answer.
- Always floats for counting people
- Always strings for arithmetic
- Always booleans for quantities
Explanation
Discrete counts fit integers; money often needs decimal/currency-aware types because binary floats can round poorly-datatype competence from the Schwerpunkt.
Question 3Programming, object modelling and software development
In a program, the three basic constructs used to control the flow of execution are which of the following?
- Sequence, selection, and iteration Correct answer.
- Compilation, interpretation, and assembly
- Encryption, decryption, and hashing
- Stacks, queues, and dictionaries
Explanation
The three fundamental programming constructs are sequence (statements in order), selection (branching with conditionals), and iteration (repetition with loops). Understanding these three constructs is an explicit GACE Programming objective.
Question 4Programming, object modelling and software development
Using standard operator precedence, what is the value of the expression 2 + 3 * 4?
- 14 Correct answer.
- 20
- 11
- 24
Explanation
Multiplication has higher precedence than addition, so 3 * 4 is evaluated first to get 12, then 2 + 12 = 14. Applying operator precedence to evaluate expressions is a GACE Programming objective.
Question 5Programming, object modelling and software development
Consider the pseudocode: x <- 5; y <- x + 3; x <- x * 2; print x; print y. What is printed?
- 10 and 8 Correct answer.
- 5 and 8
- 10 and 16
- 16 and 10
Explanation
Tracing in order: x becomes 5, then y becomes 5 + 3 = 8, then x becomes 5 * 2 = 10. Printing x then y outputs 10 and 8. The value of y was fixed when computed and is not affected by the later change to x. Tracing code to determine variable values is a GACE objective.
Question 6Programming, object modelling and software development
A program statement reads: if (age >= 18) then print "adult" else print "minor". When age is exactly 18, what is printed?
- adult Correct answer.
- minor
- Nothing is printed
- Both adult and minor
Explanation
The relational operator >= means greater than or equal to, so the condition age >= 18 is true when age is exactly 18, and the program prints "adult". Understanding relational operators and selection is a GACE Programming objective.
Question 7Programming, object modelling and software development
A loop is written as: count <- 0; while (count < 3) { print count; count <- count + 1 }. What does the loop print?
- 0 1 2 Correct answer.
- 1 2 3
- 0 1 2 3
- 0 1 2 3 4
Explanation
The loop starts with count = 0 and continues while count is less than 3. It prints 0, increments to 1, prints 1, increments to 2, prints 2, increments to 3, then the condition fails and the loop stops. The output is 0 1 2. Tracing iteration is a GACE objective.
Question 8Programming, object modelling and software development
A programmer replaces the literal value 3.14159 used many times throughout a program with a named constant PI. Which benefit most directly results from this change?
- Improved maintainability, since the value can be updated in one place Correct answer.
- Faster network transmission of the program
- Automatic encryption of the program's output
- Conversion of the program from interpreted to compiled
Explanation
Using a named constant means the value is defined once and referenced by name, so any future change requires editing only one location, improving maintainability and reducing errors. Identifying situations where constants are preferred over hard-coded values is a GACE objective.
Question 9Programming, object modelling and software development
A program attempts to divide a number by a variable whose value is zero while the program is running, causing it to crash. This is best classified as which type of error?
- A runtime error Correct answer.
- A syntax error
- A compile-time spelling error
- A documentation error
Explanation
Division by zero occurs while the program executes, not when it is being translated, so it is a runtime error. The GACE objective asks teachers to identify the type of error produced by a code segment, including syntax, runtime, overflow, round-off, and logic errors.
Question 10Programming, object modelling and software development
A program adds the integer 1 to a variable that already holds the maximum value its data type can store, and the result wraps around to a large negative number. This is an example of which type of error?
- An overflow error Correct answer.
- A syntax error
- A logic error in a comment
- A round-off error in floating point addition
Explanation
When a value exceeds the largest number a fixed-size data type can represent, it overflows and wraps around, often to a negative value. Differentiating among error types including overflow is an explicit GACE objective.
Question 11Programming, object modelling and software development
Which data type is most appropriate for storing a person's exact age in whole years?
- Integer Correct answer.
- Floating point
- String
- Boolean
Explanation
Age in whole years is a counting number with no fractional part, so an integer is the most appropriate and efficient choice. Identifying the most appropriate data type in a given context is a GACE Programming objective.
Question 12Programming, object modelling and software development
In the pseudocode notation used on the GACE assessment, the operator / indicates floating point division unless stated otherwise. What is the value of 7 / 2?
- 3.5 Correct answer.
- 3
- 4
- 1
Explanation
Floating point division keeps the fractional part, so 7 / 2 = 3.5. The GACE pseudocode notation explicitly states that / indicates floating point division unless otherwise noted. Describing the difference between integer and floating point division is a GACE objective.
Question 13Programming, object modelling and software development
A function is defined as area(length, width) returns length * width. A program calls area(4, 5). What value is returned?
- 20 Correct answer.
- 9
- 45
- 4
Explanation
The arguments 4 and 5 are passed to the parameters length and width, and the function returns length * width = 4 * 5 = 20. Tracing code that calls procedures with parameters and return values is an explicit GACE objective.
Question 14Programming, object modelling and software development
Which scenario best describes an event-driven program?
- A program that runs a specific function whenever the user clicks a button Correct answer.
- A program that prints the numbers 1 through 10 and then stops
- A program that converts a decimal number to binary once
- A program that calculates the average of a fixed list of grades
Explanation
Event-driven programs respond to external events such as clicks, key presses, sensor readings, or messages, executing handler code when an event occurs. Running a function when a button is clicked is the defining example. The GACE objective covers event-driven programs that respond to external events.
Question 15Programming, object modelling and software development
Using the GACE Boolean operators, what is the value of the expression (true and false) or (not false)?
- true Correct answer.
- false
- null
- It cannot be evaluated
Explanation
Evaluate the parts: (true and false) is false because both operands must be true for and; (not false) is true. Then false or true is true. Using Boolean algebra to evaluate expressions is a GACE objective.
Question 16Programming, object modelling and software development
Which Boolean expression is equivalent to not (A and B) according to De Morgan's laws?
- (not A) or (not B) Correct answer.
- (not A) and (not B)
- A or B
- A and B
Explanation
De Morgan's laws state that the negation of a conjunction equals the disjunction of the negations: not (A and B) is equivalent to (not A) or (not B). Identifying equivalent Boolean expressions is a GACE objective.
Question 17Programming, object modelling and software development
Which characteristic best describes a stack data structure?
- Last-in, first-out (LIFO) access, where the most recently added item is removed first Correct answer.
- First-in, first-out (FIFO) access, where the oldest item is removed first
- Key-value lookup, where each item is found by a unique key
- Direct random access to any element by numeric index only
Explanation
A stack follows last-in, first-out (LIFO) order: the most recently pushed item is the first one popped, like a stack of plates. The GACE objective requires familiarity with stacks, queues, and dictionaries/maps and their behavior.
Question 18Programming, object modelling and software development
A program must store and look up a student's grade by the student's unique ID number. Which data structure is the most appropriate choice?
- A dictionary (map) that associates each ID key with a grade value Correct answer.
- A stack that only allows access to the top element
- A queue that only allows removal from the front
- A single Boolean variable
Explanation
A dictionary or map stores key-value pairs and allows fast lookup of a value by its key, which exactly matches looking up a grade by a unique student ID. Choosing the most appropriate data structure for a context is a GACE objective.
Question 19Programming, object modelling and software development
In object-oriented programming, what does encapsulation primarily refer to?
- Bundling data and the methods that operate on it together while restricting direct access to internal state Correct answer.
- Allowing one class to inherit attributes and methods from another
- Defining multiple methods with the same name but different parameters
- Translating source code into machine code
Explanation
Encapsulation bundles an object's data (fields) and the methods that act on that data into a single unit and hides internal details, exposing a controlled interface. The GACE objective asks teachers to identify the benefits of inheritance and encapsulation.
Question 20Programming, object modelling and software development
A subclass Dog defines its own version of a method speak() that already exists in its parent class Animal, replacing the inherited behavior. This is an example of which object-oriented concept?
- Method overriding Correct answer.
- Method overloading
- Encapsulation
- Compilation
Explanation
Overriding occurs when a subclass provides its own implementation of a method that is already defined in its superclass, replacing the inherited behavior for instances of the subclass. Distinguishing between overloading and overriding is a GACE objective.
Question 21Programming, object modelling and software development
What is the key difference between a compiler and an interpreter?
- A compiler translates the entire program into machine code before execution, while an interpreter translates and executes code line by line at runtime Correct answer.
- A compiler runs code line by line, while an interpreter translates everything first
- A compiler only works with binary numbers, while an interpreter only works with decimal numbers
- There is no functional difference between them
Explanation
A compiler translates the whole source program into machine (object) code ahead of time, producing an executable, whereas an interpreter reads, translates, and executes the source one statement at a time during runtime. Identifying differences between compilation and interpretation is a GACE objective.
Question 22Algorithms, recursion and complexity
In computer science, abstraction is best described as which of the following?
- Hiding unnecessary details so a problem or system can be understood and managed at a higher level Correct answer.
- Writing out every single low-level instruction a processor executes
- Translating source code into machine language
- Measuring the time complexity of an algorithm
Explanation
Abstraction means focusing on the essential features of a problem while ignoring or hiding unnecessary details, which lets people reason about complex systems at a manageable level. The GACE objective treats abstraction as a foundational concept of computer science.
Question 23Algorithms, recursion and complexity
What is the decimal (base-10) value of the binary number 1011?
- 11 Correct answer.
- 13
- 9
- 23
Explanation
Each binary digit represents a power of two from right to left: 1x8 + 0x4 + 1x2 + 1x1 = 8 + 0 + 2 + 1 = 11. Converting between number bases is an explicit GACE Algorithms and Computational Thinking objective.
Question 24Algorithms, recursion and complexity
What is the hexadecimal representation of the decimal number 255?
- FF Correct answer.
- 100
- 0F
- F0
Explanation
Hexadecimal is base 16, where F equals 15. The value 255 equals 15x16 + 15 = FF, the largest two-digit hexadecimal number. Analyzing and converting representations of numbers in different bases is a GACE objective.
Question 25Algorithms, recursion and complexity
A student breaks the task of building a school website into smaller subtasks: design the layout, write the content, code the navigation, and test the pages. This approach best demonstrates which computational thinking practice?
- Problem decomposition Correct answer.
- Number base conversion
- Data encryption
- Operator precedence
Explanation
Problem decomposition is the practice of breaking a large, complex problem into smaller, more manageable subproblems that can be solved individually. Dividing the website project into layout, content, navigation, and testing tasks is a clear example.
Question 26Algorithms, recursion and complexity
An algorithm performs a single pass through a list of n items, doing constant work for each item. Which describes its time complexity?
- Linear, O(n) Correct answer.
- Quadratic, O(n^2)
- Logarithmic, O(log n)
- Constant, O(1)
Explanation
When the number of operations grows in direct proportion to the input size n, the running time is linear, written O(n). A single pass doing constant work per element is the canonical example of linear time.
Question 27Algorithms, recursion and complexity
A binary search is performed on a sorted list of 16 elements. What is the maximum number of comparisons needed to determine whether a target value is present?
- 5 Correct answer.
- 16
- 8
- 4
Explanation
Binary search halves the search space with each comparison, so the maximum number of comparisons is floor(log2 n) + 1. For 16 elements, log2(16) = 4, giving a maximum of 5 comparisons. Calculating comparisons for binary search is a stated GACE objective.
Question 28Algorithms, recursion and complexity
Which essential component must every recursive algorithm include to avoid running forever?
- A base case (stopping condition) Correct answer.
- A nested loop
- A global variable
- A sorting step
Explanation
A recursive algorithm calls itself on smaller inputs and must include a base case, a condition under which it stops recursing and returns a direct result. Without a base case, the recursion never terminates. Identifying the base case is an explicit GACE objective.
Question 29Algorithms, recursion and complexity
Which problem is best characterized as one that cannot be solved exactly within a practical time, making a heuristic solution appropriate?
- Finding the absolute shortest route that visits hundreds of cities exactly once (the traveling salesman problem) Correct answer.
- Adding two integers together
- Finding the largest value in a list of ten numbers
- Reversing a short string of characters
Explanation
The traveling salesman problem grows so quickly with the number of cities that finding the guaranteed optimal route becomes computationally impractical for large inputs, so heuristics that find good-enough solutions are used. Recognizing when heuristic solutions are useful is a GACE objective.
Question 30Algorithms, recursion and complexity
A teacher explains the difference between random and pseudorandom numbers. Which statement is correct?
- Pseudorandom numbers are generated by a deterministic algorithm from a seed and will repeat if the same seed is used Correct answer.
- Pseudorandom numbers can never be reproduced under any circumstances
- Truly random numbers are always produced by software loops
- Pseudorandom and truly random numbers are identical in every way
Explanation
Pseudorandom number generators use a deterministic algorithm starting from a seed value, so the same seed always produces the same sequence, which makes them reproducible. This distinguishes them from truly random sources, which derive from physical, unpredictable phenomena.
Question 31Algorithms, recursion and complexity
Consider the recursive definition: factorial(0) = 1, and factorial(n) = n * factorial(n - 1) for n > 0. What value does factorial(4) produce?
- 24 Correct answer.
- 12
- 16
- 10
Explanation
Tracing the recursion: factorial(4) = 4 * 3 * 2 * 1 * factorial(0) = 4 * 3 * 2 * 1 * 1 = 24. Tracing simple recursive algorithms such as n factorial is an explicit GACE objective.
Question 32Algorithms, recursion and complexity
A flowchart uses a diamond shape at a decision point. What does the diamond most commonly represent in standard flowchart notation?
- A condition or decision that branches the flow based on yes/no or true/false Correct answer.
- The start or end of the algorithm
- A simple process or calculation step
- Input or output of data
Explanation
In standard flowchart notation, the diamond represents a decision: a condition is evaluated and the flow branches based on the result, typically yes/no or true/false. Interpreting flowchart symbols and tracing algorithms in different formats is a GACE objective.
Question 33Algorithms, recursion and complexity
A student is given a table showing input values 1, 2, 3, 4 paired with outputs 1, 4, 9, 16. Which rule best describes the pattern that produces the outputs?
- Each output is the input squared Correct answer.
- Each output is the input plus three
- Each output is the input multiplied by four
- Each output is double the input
Explanation
Checking the pairs: 1^2 = 1, 2^2 = 4, 3^2 = 9, 4^2 = 16. The output equals the square of the input. Identifying patterns in a table of values and the algorithm that produces them is a GACE pattern-recognition objective.
Question 34Algorithms, recursion and complexity
An algorithm using nested loops compares every element of a list to every other element. As the list size n grows large, which growth rate best describes the number of comparisons?
- Quadratic, proportional to n^2 Correct answer.
- Linear, proportional to n
- Logarithmic, proportional to log n
- Constant, independent of n
Explanation
When an inner loop runs n times for each of the n iterations of an outer loop, the total number of comparisons is proportional to n times n, which is n^2, or quadratic growth. The GACE objective asks teachers to identify and compare linear, quadratic, exponential, and logarithmic algorithms.
Question 35Algorithms, recursion and complexity
Which list of items represents an abstraction hierarchy correctly ordered from the lowest (most detailed) level to the highest (most abstract) level?
- Transistors, logic gates, integrated circuits, computer Correct answer.
- Computer, integrated circuits, logic gates, transistors
- Logic gates, transistors, computer, integrated circuits
- Integrated circuits, computer, transistors, logic gates
Explanation
Abstraction hierarchies build from the most detailed physical components upward. Transistors combine into logic gates, gates form integrated circuits, and circuits make up the complete computer, moving from low (detailed) to high (abstract). Ordering an abstraction hierarchy is a GACE objective.
Question 36Algorithms, recursion and complexity
An algorithm's running time doubles every time one additional input element is added. Which growth rate does this describe?
- Exponential Correct answer.
- Linear
- Logarithmic
- Constant
Explanation
If adding one element doubles the work, the running time grows as a power of two with respect to input size, which is exponential growth. Exponential algorithms quickly become infeasible for large inputs, a key idea in the GACE limitations objective.
Question 37Algorithms, recursion and complexity
A selection sort repeatedly finds the smallest remaining element and places it at the front of the unsorted portion. After the first full pass over an unsorted list, which statement is guaranteed to be true?
- The smallest element is now in the first position Correct answer.
- The entire list is fully sorted
- The largest element is now in the first position
- No elements have changed position
Explanation
Selection sort scans the unsorted portion to find the minimum and swaps it into the next sorted position. After the first pass, the smallest element is correctly placed at the front. Tracing sorting algorithms and predicting intermediate results is a GACE objective.
Question 38Algorithms, recursion and complexity
Which application is the most appropriate use of randomization in computing?
- Shuffling a deck of cards in a digital card game Correct answer.
- Calculating the exact sum of a column of numbers in a spreadsheet
- Sorting a list of names into alphabetical order
- Converting a decimal number to binary
Explanation
Randomization is appropriate when unpredictability or fairness is desired, such as shuffling a virtual deck so each game deals a different arrangement. The GACE objective asks teachers to identify appropriate uses of randomization across applications.
Question 39Algorithms, recursion and complexity
A linear search examines a list of 100 unsorted items for a target value. In the worst case, how many items must it examine?
- 100 Correct answer.
- 7
- 50
- 1
Explanation
A linear search checks elements one at a time. In the worst case, the target is the last element or absent, so all 100 items must be examined. Calculating comparisons for linear search is a stated GACE objective.
Question 40Algorithms, recursion and complexity
A problem is described as undecidable, meaning no algorithm can ever solve it for all possible inputs. Which classic example fits this description?
- The halting problem: deciding whether an arbitrary program will eventually stop Correct answer.
- Adding two numbers stored in variables
- Searching a sorted array for a value
- Sorting a list of integers in ascending order
Explanation
The halting problem is the classic undecidable problem: no general algorithm can determine, for every possible program and input, whether the program will halt or run forever. Recognizing that some problems cannot be solved by a computer is a GACE objective.
Question 41Algorithms, recursion and complexity
An iterative algorithm uses a loop to compute the sum of the first n positive integers. Which recursive definition is equivalent?
- sum(n) = n + sum(n - 1), with sum(0) = 0 Correct answer.
- sum(n) = n * sum(n - 1), with sum(0) = 1
- sum(n) = sum(n - 1) - n, with sum(0) = 0
- sum(n) = n, with no base case
Explanation
The sum of the first n integers can be defined recursively by adding n to the sum of the first n-1 integers, with the base case sum(0) = 0. The GACE objective asks teachers to identify an iterative algorithm equivalent to a recursive one and vice versa.
Question 42Entity modelling, relational algebra and SQL
What does referential integrity protect in a relational schema?
- That foreign-key values match existing primary keys in the referenced table (or are null if allowed) Correct answer.
- That CSS colours match the brand book
- That every spreadsheet chart is 3D
- That HTML files contain no links
Explanation
Referential integrity keeps relationships consistent-e.g., an order cannot reference a non-existent customer-critical for reliable business data.
Question 43Entity modelling, relational algebra and SQL
Which SQL clause filters rows that satisfy a condition?
- WHERE Correct answer.
- FROM only
- GROUP BY only
- CREATE TABLE only
Explanation
WHERE restricts which rows are returned or affected. FROM names sources; GROUP BY aggregates; CREATE TABLE defines schema.
Question 44Entity modelling, relational algebra and SQL
What does a relational JOIN primarily accomplish?
- Combine related rows from multiple tables using matching key values Correct answer.
- Compress images for HTML
- Assign ISO layer numbers to cables
- Compile Java bytecode
Explanation
Joins implement Verbund across relations-needed for multi-table business queries (orders with customers, lines with products).
Question 45Entity modelling, relational algebra and SQL
Why export database query results in a WI practical task?
- To hand structured results to spreadsheets, reports, or other systems in the process chain Correct answer.
- Because SQL cannot display any results on screen
- To replace the need for primary keys
- To disable referential integrity permanently
Explanation
Datenexport is an explicit Schwerpunkt bullet-moving query results into other tools supports end-to-end business reporting.
Question 46Entity modelling, relational algebra and SQL
Which field is the best primary key for a Customer table in an ERP-style schema?
- A stable unique customer number Correct answer.
- The customer’s current city (many share cities)
- Favourite colour
- The word "customer" repeated in every row
Explanation
Primary keys must uniquely identify rows. Surrogate/business numbers work; non-unique attributes like city do not.
Question 47Entity modelling, relational algebra and SQL
Projection in relational queries means which operation?
- Choosing which columns/attributes appear in the result Correct answer.
- Choosing which network cable to plug in
- Choosing a CSS font only
- Deleting the database file from the OS
Explanation
Projection selects attributes (columns); selection/restriction filters tuples (rows). Both appear in SQL as SELECT-list vs WHERE.
Question 48Entity modelling, relational algebra and SQL
Which statement about normalisation (e.g. toward 3NF) is correct at WI level?
- It reduces redundant storage of the same fact and helps avoid update anomalies Correct answer.
- It always merges all tables into one wide table
- It replaces SQL with HTML
- It is only about choosing pie charts
Explanation
Rahmenplan Wahlthemen include Normalisierung bis zur 3. Normalform-motivated by redundancy control and anomaly avoidance in business data.
Question 49Entity modelling, relational algebra and SQL
Which SQL statement changes an existing customer’s phone number?
- UPDATE ... SET ... WHERE ... Correct answer.
- SELECT phone FROM customer
- CREATE INDEX only
- DROP DATABASE
Explanation
UPDATE modifies existing rows. SELECT reads; CREATE INDEX affects access paths; DROP DATABASE destroys the database.
Question 50Entity modelling, relational algebra and SQL
What is a practical reason ERP-style systems rely on relational databases rather than one giant spreadsheet?
- Multi-user integrity, structured relations, and controlled queries at process scale Correct answer.
- Spreadsheets cannot hold any numbers
- Databases cannot export data
- SQL cannot filter rows
Explanation
Enterprise processes need concurrent access, integrity constraints, and multi-table queries-relational DBMS strengths beyond personal sheets.