answer
string
choices
dict
id
string
kind
string
lang
string
question
string
steps
list
subject
string
text
string
topic
string
dict.get returns the default 0 when the key is missing.
null
cs_0051
worked_example
en
What does {'a':1}.get('b',0) return?
[ "Key 'b' missing.", "Default 0 applies.", "Returns 0." ]
computer_science
Answer: 0. Steps: 1. Key 'b' missing. 2. Default 0 applies. 3. Returns 0.
python
Slicing takes [start:stop:step] with stop excluded.
null
cs_0052
concept
en
How does Python slicing work?
[ "Start included.", "Stop excluded.", "Step skips items." ]
computer_science
Answer: [start:stop:step]. Steps: 1. Start included. 2. Stop excluded. 3. Step skips items.
python
Řez 'abcdef'[1:4] dá 'bcd'.
null
cs_0053
worked_example
cs
Co vrátí 'abcdef'[1:4]?
[ "Indexy 1 až 3.", "Znaky b, c, d.", "Výsledek 'bcd'." ]
computer_science
Answer: 'bcd'. Steps: 1. Indexy 1 až 3. 2. Znaky b, c, d. 3. Výsledek 'bcd'.
python
range(3) yields 0, 1, 2.
{ "A": "0, 1, 2", "B": "1, 2, 3", "C": "0, 1, 2, 3", "D": "3, 2, 1" }
cs_0054
multiple_choice
en
What does range(3) produce?
[ "Starts at 0.", "Stops before 3.", "Select option A." ]
computer_science
Answer: 0, 1, 2. Steps: 1. Starts at 0. 2. Stops before 3. 3. Select option A. Answer: (A)
python
Functions are defined with def and send values back via return.
null
cs_0055
concept
en
How are Python functions defined?
[ "Use def keyword.", "Name parameters.", "Return the result." ]
computer_science
Answer: def with return. Steps: 1. Use def keyword. 2. Name parameters. 3. Return the result.
python
f(3) = 3**2 + 1 = 10.
null
cs_0056
worked_example
en
If f(x) = x**2 + 1, what is f(3)?
[ "Square: 3**2 = 9.", "Add 1.", "Result = 10." ]
computer_science
Answer: 10. Steps: 1. Square: 3**2 = 9. 2. Add 1. 3. Result = 10.
python
The def keyword defines a Python function.
{ "A": "fun", "B": "function", "C": "define", "D": "def" }
cs_0057
multiple_choice
en
Which keyword defines a function?
[ "Python uses def.", "Others are wrong.", "Select option D." ]
computer_science
Answer: def. Steps: 1. Python uses def. 2. Others are wrong. 3. Select option D. Answer: (D)
python
Slovník mapuje klíče na hodnoty ve složených závorkách.
null
cs_0058
concept
cs
Co je slovník (dict)?
[ "Páry klíč: hodnota.", "Složené závorky.", "Přístup přes klíč." ]
computer_science
Answer: Mapování klíčů. Steps: 1. Páry klíč: hodnota. 2. Složené závorky. 3. Přístup přes klíč.
python
The average is 2.5, from 10 divided by 4.
null
cs_0059
worked_example
en
What is sum([1,2,3,4])/4?
[ "Sum = 10.", "Divide by 4.", "Result = 2.5." ]
computer_science
Answer: 2.5. Steps: 1. Sum = 10. 2. Divide by 4. 3. Result = 2.5.
python
'a' in 'cat' is True since 'a' appears in the string.
{ "A": "Error", "B": "True", "C": "False", "D": "None" }
cs_0060
multiple_choice
en
What is 'a' in 'cat'?
[ "Check membership.", "'a' is present.", "Select option B." ]
computer_science
Answer: True. Steps: 1. Check membership. 2. 'a' is present. 3. Select option B. Answer: (B)
python
let allows reassignment, const forbids it, and var is legacy function-scoped.
null
cs_0061
concept
en
How do let, const, and var differ?
[ "let: block-scoped, mutable.", "const: no reassignment.", "var: legacy, function-scoped." ]
computer_science
Answer: Mutable, fixed, legacy. Steps: 1. let: block-scoped, mutable. 2. const: no reassignment. 3. var: legacy, function-scoped.
javascript
const forbids rebinding the variable to a new value.
{ "A": "Allows anything", "B": "Makes objects frozen", "C": "Forbids reassignment", "D": "Deletes variables" }
cs_0062
multiple_choice
en
What does const prevent?
[ "Binding stays fixed.", "Contents may mutate.", "Select option C." ]
computer_science
Answer: Forbids reassignment. Steps: 1. Binding stays fixed. 2. Contents may mutate. 3. Select option C. Answer: (C)
javascript
map doubles each element, giving [2, 4, 6].
null
cs_0063
worked_example
en
What does [1,2,3].map(x => x*2) return?
[ "Apply x*2 to 1: 2.", "To 2: 4; to 3: 6.", "Result [2, 4, 6]." ]
computer_science
Answer: [2, 4, 6]. Steps: 1. Apply x*2 to 1: 2. 2. To 2: 4; to 3: 6. 3. Result [2, 4, 6].
javascript
Pole je seřazená kolekce prvků v hranatých závorkách.
null
cs_0064
concept
cs
Co je pole v JavaScriptu?
[ "Hranaté závorky.", "Indexování od 0.", "Metody map, filter." ]
computer_science
Answer: Seřazená kolekce. Steps: 1. Hranaté závorky. 2. Indexování od 0. 3. Metody map, filter.
javascript
'hello'.length counts 5 characters.
null
cs_0065
worked_example
en
What is 'hello'.length?
[ "Count h,e,l,l,o.", "Total 5.", "length = 5." ]
computer_science
Answer: 5. Steps: 1. Count h,e,l,l,o. 2. Total 5. 3. length = 5.
javascript
Strict === compares value and type without coercion.
{ "A": "Value and type", "B": "Value only", "C": "Type only", "D": "Nothing" }
cs_0066
multiple_choice
en
What does === check?
[ "No type coercion.", "Both must match.", "Select option A." ]
computer_science
Answer: Value and type. Steps: 1. No type coercion. 2. Both must match. 3. Select option A. Answer: (A)
javascript
Arrow functions are compact (x) => expr with lexical this.
null
cs_0067
concept
en
What are arrow functions?
[ "Short syntax.", "Lexical this binding.", "Example: x => x*2." ]
computer_science
Answer: Compact lexical functions. Steps: 1. Short syntax. 2. Lexical this binding. 3. Example: x => x*2.
javascript
Filtr vrátí [2, 3], prvky větší než 1.
null
cs_0068
worked_example
cs
Co vrátí [1,2,3].filter(x => x > 1)?
[ "Testuj 1: ne.", "Testuj 2, 3: ano.", "Výsledek [2, 3]." ]
computer_science
Answer: [2, 3]. Steps: 1. Testuj 1: ne. 2. Testuj 2, 3: ano. 3. Výsledek [2, 3].
javascript
JSON.parse converts a JSON string into an object.
{ "A": "Object to string", "B": "Number to string", "C": "Array to set", "D": "String to object" }
cs_0069
multiple_choice
en
What does JSON.parse do?
[ "Takes JSON text.", "Builds value.", "Select option D." ]
computer_science
Answer: String to object. Steps: 1. Takes JSON text. 2. Builds value. 3. Select option D. Answer: (D)
javascript
Promises represent future values with then/catch chains instead of nested callbacks.
null
cs_0070
concept
en
What are promises?
[ "Pending, then settled.", "then handles success.", "catch handles errors." ]
computer_science
Answer: Future values with chains. Steps: 1. Pending, then settled. 2. then handles success. 3. catch handles errors.
javascript
2 + '2' coerces to string concatenation, giving '22'.
null
cs_0071
worked_example
en
What is 2 + '2' in JavaScript?
[ "One operand is string.", "Number coerces to '2'.", "Concat gives '22'." ]
computer_science
Answer: '22'. Steps: 1. One operand is string. 2. Number coerces to '2'. 3. Concat gives '22'.
javascript
Object literals group key-value pairs in braces.
null
cs_0072
concept
en
What are object literals?
[ "Braces hold pairs.", "Keys map to values.", "Example: {a: 1}." ]
computer_science
Answer: Key-value in braces. Steps: 1. Braces hold pairs. 2. Keys map to values. 3. Example: {a: 1}.
javascript
Arrays are objects, so typeof [] is 'object'.
{ "A": "array", "B": "object", "C": "list", "D": "undefined" }
cs_0073
multiple_choice
en
What is typeof []?
[ "Arrays inherit objects.", "typeof reports object.", "Select option B." ]
computer_science
Answer: 'object'. Steps: 1. Arrays inherit objects. 2. typeof reports object. 3. Select option B. Answer: (B)
javascript
Math.max(3, 7, 5) vrátí 7.
null
cs_0074
worked_example
cs
Co vrátí Math.max(3, 7, 5)?
[ "Porovnej 3 a 7.", "Větší je 7.", "Proti 5 vítězí 7." ]
computer_science
Answer: 7. Steps: 1. Porovnej 3 a 7. 2. Větší je 7. 3. Proti 5 vítězí 7.
javascript
Template literals use backticks with ${} interpolation.
null
cs_0075
concept
en
What are template literals?
[ "Backtick strings.", "Embed ${expr}.", "Span multiple lines." ]
computer_science
Answer: Backtick interpolated strings. Steps: 1. Backtick strings. 2. Embed ${expr}. 3. Span multiple lines.
javascript
SELECT lists columns from a table, optionally filtered and ordered.
null
cs_0076
concept
en
What does SELECT do in SQL?
[ "Names columns.", "Names table.", "Adds filters." ]
computer_science
Answer: Reads columns from table. Steps: 1. Names columns. 2. Names table. 3. Adds filters.
sql
WHERE filters rows by a condition.
{ "A": "WHERE", "B": "ORDER", "C": "GROUP", "D": "JOIN" }
cs_0077
multiple_choice
en
Which clause filters rows?
[ "Need row condition.", "That is WHERE.", "Select option A." ]
computer_science
Answer: WHERE. Steps: 1. Need row condition. 2. That is WHERE. 3. Select option A. Answer: (A)
sql
SELECT 2 + 3 returns 5.
null
cs_0078
worked_example
en
What does SELECT 2 + 3 return?
[ "Add 2 and 3.", "Result 5.", "One row returned." ]
computer_science
Answer: 5. Steps: 1. Add 2 and 3. 2. Result 5. 3. One row returned.
sql
SELECT čte sloupce z tabulky, volitelně s filtrem.
null
cs_0079
concept
cs
Co je dotaz SELECT?
[ "Jmenuje sloupce.", "Jmenuje tabulku.", "Přidá filtr." ]
computer_science
Answer: Čtení z tabulky. Steps: 1. Jmenuje sloupce. 2. Jmenuje tabulku. 3. Přidá filtr.
sql
COUNT(*) over 4 rows returns 4.
null
cs_0080
worked_example
en
Table t has 4 rows. What does SELECT COUNT(*) FROM t return?
[ "Count all rows.", "Four present.", "Returns 4." ]
computer_science
Answer: 4. Steps: 1. Count all rows. 2. Four present. 3. Returns 4.
sql
ORDER BY sorts result rows by columns.
{ "A": "WHERE", "B": "GROUP BY", "C": "ORDER BY", "D": "HAVING" }
cs_0081
multiple_choice
en
Which clause sorts results?
[ "Need ordering.", "That is ORDER BY.", "Select option C." ]
computer_science
Answer: ORDER BY. Steps: 1. Need ordering. 2. That is ORDER BY. 3. Select option C. Answer: (C)
sql
INNER keeps matches, LEFT keeps all left rows, FULL keeps everything.
null
cs_0082
concept
en
How do JOIN types differ?
[ "INNER: matches only.", "LEFT: all left rows.", "FULL: all rows both." ]
computer_science
Answer: Match scope differs. Steps: 1. INNER: matches only. 2. LEFT: all left rows. 3. FULL: all rows both.
sql
SELECT 10.0 / 4 vrátí 2.5.
null
cs_0083
worked_example
cs
Co vrátí SELECT 10.0 / 4?
[ "Vyděl 10.0 čtyřmi.", "Výsledek 2.5.", "Jeden řádek." ]
computer_science
Answer: 2.5. Steps: 1. Vyděl 10.0 čtyřmi. 2. Výsledek 2.5. 3. Jeden řádek.
sql
DISTINCT drops duplicate rows from results.
{ "A": "UNIQUE", "B": "DISTINCT", "C": "FILTER", "D": "LIMIT" }
cs_0084
multiple_choice
en
Which keyword removes duplicates?
[ "Need dedup.", "That is DISTINCT.", "Select option B." ]
computer_science
Answer: DISTINCT. Steps: 1. Need dedup. 2. That is DISTINCT. 3. Select option B. Answer: (B)
sql
GROUP BY aggregates per group; HAVING filters groups like WHERE filters rows.
null
cs_0085
concept
en
How do GROUP BY and HAVING work?
[ "Group rows by key.", "Aggregate each group.", "HAVING filters groups." ]
computer_science
Answer: Aggregate then filter groups. Steps: 1. Group rows by key. 2. Aggregate each group. 3. HAVING filters groups.
sql
SUM(1, 2, 3) totals 6.
null
cs_0086
worked_example
en
What does SELECT SUM(x) give for x in (1,2,3)?
[ "Add 1 + 2 + 3.", "Total 6.", "One row returned." ]
computer_science
Answer: 6. Steps: 1. Add 1 + 2 + 3. 2. Total 6. 3. One row returned.
sql
A primary key uniquely identifies each row and cannot be NULL.
null
cs_0087
concept
en
What is a primary key?
[ "Unique per row.", "Never NULL.", "Example: id column." ]
computer_science
Answer: Unique row identifier. Steps: 1. Unique per row. 2. Never NULL. 3. Example: id column.
sql
PRIMARY KEY enforces unique non-null row identity.
{ "A": "FOREIGN KEY", "B": "INDEX", "C": "NULL", "D": "PRIMARY KEY" }
cs_0088
multiple_choice
en
Which constraint gives unique row identity?
[ "Need unique id.", "That is PRIMARY KEY.", "Select option D." ]
computer_science
Answer: PRIMARY KEY. Steps: 1. Need unique id. 2. That is PRIMARY KEY. 3. Select option D. Answer: (D)
sql
Primární klíč jednoznačně určuje každý řádek a není NULL.
null
cs_0089
concept
cs
Co je primární klíč?
[ "Jedinečný na řádek.", "Nikdy NULL.", "Příklad: sloupec id." ]
computer_science
Answer: Jedinečný identifikátor. Steps: 1. Jedinečný na řádek. 2. Nikdy NULL. 3. Příklad: sloupec id.
sql
AVG(10, 20, 30) = 60/3 = 20.0.
null
cs_0090
worked_example
en
What does SELECT AVG(x) give for x in (10,20,30)?
[ "Sum = 60.", "Count = 3.", "Average = 20.0." ]
computer_science
Answer: 20.0. Steps: 1. Sum = 60. 2. Count = 3. 3. Average = 20.0.
sql
TCP guarantees ordered delivery; UDP is fast but unreliable.
null
cs_0091
concept
en
How do TCP and UDP differ?
[ "TCP: reliable, ordered.", "UDP: fast, best-effort.", "Use: web vs video." ]
computer_science
Answer: Reliable versus fast. Steps: 1. TCP: reliable, ordered. 2. UDP: fast, best-effort. 3. Use: web vs video.
networking
TCP retransmits lost packets for reliability.
{ "A": "TCP", "B": "UDP", "C": "IP", "D": "ICMP" }
cs_0092
multiple_choice
en
Which protocol is reliable?
[ "Needs retransmission.", "TCP provides it.", "Select option A." ]
computer_science
Answer: TCP. Steps: 1. Needs retransmission. 2. TCP provides it. 3. Select option A. Answer: (A)
networking
A /24 network holds 254 usable hosts (2^8 - 2).
null
cs_0093
worked_example
en
How many usable hosts in 192.168.1.0/24?
[ "Host bits = 32 - 24 = 8.", "Total = 2^8 = 256.", "Minus network/broadcast = 254." ]
computer_science
Answer: 254. Steps: 1. Host bits = 32 - 24 = 8. 2. Total = 2^8 = 256. 3. Minus network/broadcast = 254.
networking
IP adresa je číselný identifikátor zařízení v síti.
null
cs_0094
concept
cs
Co je IP adresa?
[ "Číselný identifikátor.", "IPv4 má 32 bitů.", "Příklad: 192.168.1.1." ]
computer_science
Answer: Identifikátor zařízení. Steps: 1. Číselný identifikátor. 2. IPv4 má 32 bitů. 3. Příklad: 192.168.1.1.
networking
DNS resolves domain names to IP addresses via hierarchical lookup.
null
cs_0095
concept
en
How does DNS resolution work?
[ "Query resolver.", "Walk root to TLD to auth.", "Cache the answer." ]
computer_science
Answer: Names to IPs hierarchically. Steps: 1. Query resolver. 2. Walk root to TLD to auth. 3. Cache the answer.
networking
DNS maps domain names to IP addresses.
{ "A": "IPs to MACs", "B": "Names to IPs", "C": "Ports to apps", "D": "Files to URLs" }
cs_0096
multiple_choice
en
What does DNS map?
[ "Names in, IPs out.", "Eliminate others.", "Select option B." ]
computer_science
Answer: Names to IPs. Steps: 1. Names in, IPs out. 2. Eliminate others. 3. Select option B. Answer: (B)
networking
A /16 holds 65,534 usable hosts (2^16 - 2).
null
cs_0097
worked_example
en
How many usable hosts in a /16 network?
[ "Host bits = 16.", "Total = 2^16 = 65,536.", "Minus 2 = 65,534." ]
computer_science
Answer: 65,534. Steps: 1. Host bits = 16. 2. Total = 2^16 = 65,536. 3. Minus 2 = 65,534.
networking
HTTP standardně používá port 80.
null
cs_0098
worked_example
cs
Kolik je standardní port HTTP?
[ "HTTP má 80.", "HTTPS má 443.", "Odpověď: 80." ]
computer_science
Answer: 80. Steps: 1. HTTP má 80. 2. HTTPS má 443. 3. Odpověď: 80.
networking
HTTP defaults to port 80.
{ "A": "21", "B": "25", "C": "80", "D": "443" }
cs_0099
multiple_choice
en
What is the default HTTP port?
[ "HTTP standard.", "Port 80.", "Select option C." ]
computer_science
Answer: 80. Steps: 1. HTTP standard. 2. Port 80. 3. Select option C. Answer: (C)
networking
The OSI model has 7 layers from physical to application.
null
cs_0100
concept
en
How many OSI layers exist?
[ "Physical to application.", "Seven total.", "Example: network is 3." ]
computer_science
Answer: 7 layers. Steps: 1. Physical to application. 2. Seven total. 3. Example: network is 3.
networking
A /24 mask is 255.255.255.0: 24 ones then 8 zeros.
null
cs_0101
worked_example
en
What is the subnet mask for /24?
[ "24 network bits set.", "Three full octets.", "Mask = 255.255.255.0." ]
computer_science
Answer: 255.255.255.0. Steps: 1. 24 network bits set. 2. Three full octets. 3. Mask = 255.255.255.0.
networking
HTTPS defaults to port 443.
{ "A": "80", "B": "21", "C": "25", "D": "443" }
cs_0102
multiple_choice
en
What is the default HTTPS port?
[ "Encrypted HTTP.", "Port 443.", "Select option D." ]
computer_science
Answer: 443. Steps: 1. Encrypted HTTP. 2. Port 443. 3. Select option D. Answer: (D)
networking
DNS převádí doménová jména na IP adresy.
null
cs_0103
concept
cs
Co je DNS?
[ "Jména na adresy.", "Hierarchické dotazy.", "Ukládání do mezipaměti." ]
computer_science
Answer: Překlad jmen na IP. Steps: 1. Jména na adresy. 2. Hierarchické dotazy. 3. Ukládání do mezipaměti.
networking
Switches forward within a LAN by MAC; routers join networks by IP.
null
cs_0104
concept
en
How do routers and switches differ?
[ "Switch: LAN, MAC-based.", "Router: networks, IP-based.", "Layers 2 vs 3." ]
computer_science
Answer: LAN versus networks. Steps: 1. Switch: LAN, MAC-based. 2. Router: networks, IP-based. 3. Layers 2 vs 3.
networking
192.168.1.1 is private; the rest are public addresses.
{ "A": "192.168.1.1", "B": "8.8.8.8", "C": "1.1.1.1", "D": "9.9.9.9" }
cs_0105
multiple_choice
en
Which IP is private?
[ "192.168.x is private.", "Others are public.", "Select option A." ]
computer_science
Answer: 192.168.1.1. Steps: 1. 192.168.x is private. 2. Others are public. 3. Select option A. Answer: (A)
networking
The relational model stores data in tables of rows and columns.
null
cs_0106
concept
en
What is the relational model?
[ "Tables hold data.", "Rows are records.", "Keys link tables." ]
computer_science
Answer: Tables of rows. Steps: 1. Tables hold data. 2. Rows are records. 3. Keys link tables.
databases
Table rows are also called records.
{ "A": "Attributes", "B": "Records", "C": "Schemas", "D": "Keys" }
cs_0107
multiple_choice
en
What are table rows also called?
[ "Rows hold one entry.", "Called records.", "Select option B." ]
computer_science
Answer: Records. Steps: 1. Rows hold one entry. 2. Called records. 3. Select option B. Answer: (B)
databases
Three INSERTs into an empty table leave 3 rows.
null
cs_0108
worked_example
en
INSERT 3 rows into an empty table. How many rows?
[ "Start at 0.", "Add 3.", "Total = 3." ]
computer_science
Answer: 3. Steps: 1. Start at 0. 2. Add 3. 3. Total = 3.
databases
Relační databáze ukládá data do tabulek propojených klíči.
null
cs_0109
concept
cs
Co je relační databáze?
[ "Tabulky řádků.", "Sloupce atributů.", "Klíče spojují." ]
computer_science
Answer: Tabulky s klíči. Steps: 1. Tabulky řádků. 2. Sloupce atributů. 3. Klíče spojují.
databases
Indexes speed lookups by avoiding full table scans.
null
cs_0110
concept
en
What is a database index?
[ "Sorted lookup aid.", "Skips full scans.", "Costs write speed." ]
computer_science
Answer: Fast lookup aid. Steps: 1. Sorted lookup aid. 2. Skips full scans. 3. Costs write speed.
databases
Indexes exist to make lookups faster.
{ "A": "Faster lookup", "B": "Slower reads", "C": "More storage only", "D": "No effect" }
cs_0111
multiple_choice
en
What is an index for?
[ "Avoid full scans.", "Speed queries.", "Select option A." ]
computer_science
Answer: Faster lookup. Steps: 1. Avoid full scans. 2. Speed queries. 3. Select option A. Answer: (A)
databases
A cross join of 3 and 4 rows yields at most 12 rows.
null
cs_0112
worked_example
en
Cross-join tables of 3 and 4 rows. How many rows max?
[ "Each left pairs each right.", "Multiply: 3 x 4.", "Max = 12." ]
computer_science
Answer: 12. Steps: 1. Each left pairs each right. 2. Multiply: 3 x 4. 3. Max = 12.
databases
Po smazání 1 ze 3 řádků zbudou 2.
null
cs_0113
worked_example
cs
Tabulka má 3 řádky, DELETE smaže 1. Kolik zbude?
[ "Začni na 3.", "Odečti 1.", "Zbývají 2." ]
computer_science
Answer: 2. Steps: 1. Začni na 3. 2. Odečti 1. 3. Zbývají 2.
databases
ACID stands for atomicity, consistency, isolation, durability.
{ "A": "Availability", "B": "Accuracy", "C": "Atomicity", "D": "Audit" }
cs_0114
multiple_choice
en
What is the A in ACID?
[ "All-or-nothing.", "That is atomicity.", "Select option C." ]
computer_science
Answer: Atomicity. Steps: 1. All-or-nothing. 2. That is atomicity. 3. Select option C. Answer: (C)
databases
A transaction groups statements into one atomic unit.
null
cs_0115
concept
en
What is a transaction?
[ "Group statements.", "Commit or rollback.", "Stays atomic." ]
computer_science
Answer: Atomic statement group. Steps: 1. Group statements. 2. Commit or rollback. 3. Stays atomic.
databases
Raising 100 by 10% gives 110.
null
cs_0116
worked_example
en
UPDATE sets price = price * 1.1 with price 100. New value?
[ "Multiply: 100 x 1.1.", "Result 110.", "One row updated." ]
computer_science
Answer: 110. Steps: 1. Multiply: 100 x 1.1. 2. Result 110. 3. One row updated.
databases
A foreign key references another table's primary key.
null
cs_0117
concept
en
What is a foreign key?
[ "Points to other table.", "Matches its PK.", "Enforces links." ]
computer_science
Answer: Link to other PK. Steps: 1. Points to other table. 2. Matches its PK. 3. Enforces links.
databases
Foreign keys reference another table's primary key.
{ "A": "Own index", "B": "Another table's PK", "C": "Any column", "D": "Nothing" }
cs_0118
multiple_choice
en
What does a foreign key reference?
[ "Links tables.", "Targets PK.", "Select option B." ]
computer_science
Answer: Another table's PK. Steps: 1. Links tables. 2. Targets PK. 3. Select option B. Answer: (B)
databases
Transakce je atomická skupina příkazů s commitem nebo rollbackem.
null
cs_0119
concept
cs
Co je transakce?
[ "Skupina příkazů.", "Commit nebo rollback.", "Vše nebo nic." ]
computer_science
Answer: Atomická skupina. Steps: 1. Skupina příkazů. 2. Commit nebo rollback. 3. Vše nebo nic.
databases
The query returns the 2 matching rows.
null
cs_0120
worked_example
en
5 rows exist, WHERE matches 2. How many returned?
[ "Filter 5 rows.", "Keep 2.", "Returns 2." ]
computer_science
Answer: 2. Steps: 1. Filter 5 rows. 2. Keep 2. 3. Returns 2.
databases
A process owns memory; threads share it while running code.
null
cs_0121
concept
en
How do processes and threads differ?
[ "Process: own memory.", "Thread: shared memory.", "Threads run inside processes." ]
computer_science
Answer: Own versus shared memory. Steps: 1. Process: own memory. 2. Thread: shared memory. 3. Threads run inside processes.
operating_systems
A thread is the lightweight unit of execution.
{ "A": "Process", "B": "Program", "C": "File", "D": "Thread" }
cs_0122
multiple_choice
en
What is the lightweight execution unit?
[ "Runs code.", "Shares memory.", "Select option D." ]
computer_science
Answer: Thread. Steps: 1. Runs code. 2. Shares memory. 3. Select option D. Answer: (D)
operating_systems
4 cores with 2 threads each give 8 logical CPUs.
null
cs_0123
worked_example
en
4 cores, 2 threads each. How many logical CPUs?
[ "Multiply: 4 x 2.", "Result 8.", "8 logical CPUs." ]
computer_science
Answer: 8. Steps: 1. Multiply: 4 x 2. 2. Result 8. 3. 8 logical CPUs.
operating_systems
Proces je běžící program s vlastním paměťovým prostorem.
null
cs_0124
concept
cs
Co je proces?
[ "Běžící program.", "Vlastní paměť.", "Spravuje ho OS." ]
computer_science
Answer: Běžící program. Steps: 1. Běžící program. 2. Vlastní paměť. 3. Spravuje ho OS.
operating_systems
Paging splits memory into fixed pages swapped between RAM and disk.
null
cs_0125
concept
en
What is virtual memory paging?
[ "Fixed-size pages.", "Swap RAM to disk.", "Illusion of more RAM." ]
computer_science
Answer: Page swapping illusion. Steps: 1. Fixed-size pages. 2. Swap RAM to disk. 3. Illusion of more RAM.
operating_systems
FIFO evicts the oldest loaded page first.
{ "A": "Oldest", "B": "Newest", "C": "Random", "D": "Largest" }
cs_0126
multiple_choice
en
Which page does FIFO evict?
[ "First in first out.", "Oldest leaves.", "Select option A." ]
computer_science
Answer: Oldest. Steps: 1. First in first out. 2. Oldest leaves. 3. Select option A. Answer: (A)
operating_systems
Three fresh references with 3 frames cause 3 page faults.
null
cs_0127
worked_example
en
3 frames empty, references 1, 2, 3. How many faults?
[ "1 misses: fault.", "2 misses: fault.", "3 misses: fault; total 3." ]
computer_science
Answer: 3. Steps: 1. 1 misses: fault. 2. 2 misses: fault. 3. 3 misses: fault; total 3.
operating_systems
2 GB RAM plus 1 GB swap dá 3 GB virtuální paměti.
null
cs_0128
worked_example
cs
2 GB RAM a 1 GB swap. Kolik virtuální paměti?
[ "Sečti RAM a swap.", "2 + 1.", "Celkem 3 GB." ]
computer_science
Answer: 3 GB. Steps: 1. Sečti RAM a swap. 2. 2 + 1. 3. Celkem 3 GB.
operating_systems
Deadlock needs all four Coffman conditions at once.
{ "A": "2", "B": "3", "C": "4", "D": "1" }
cs_0129
multiple_choice
en
How many conditions does deadlock need?
[ "Mutual exclusion etc.", "Four total.", "Select option C." ]
computer_science
Answer: 4. Steps: 1. Mutual exclusion etc. 2. Four total. 3. Select option C. Answer: (C)
operating_systems
Round-robin cycles processes with fixed time quanta.
null
cs_0130
concept
en
How does round-robin scheduling work?
[ "Queue processes.", "Run each one quantum.", "Cycle repeats." ]
computer_science
Answer: Cycling time quanta. Steps: 1. Queue processes. 2. Run each one quantum. 3. Cycle repeats.
operating_systems
One cycle over 3 processes at 10 ms takes 30 ms.
null
cs_0131
worked_example
en
Quantum 10 ms, 3 processes. How long is one cycle?
[ "Each runs 10 ms.", "Three in cycle.", "Total = 30 ms." ]
computer_science
Answer: 30 ms. Steps: 1. Each runs 10 ms. 2. Three in cycle. 3. Total = 30 ms.
operating_systems
Kernel mode runs privileged instructions; user mode cannot.
{ "A": "Slower", "B": "Privileged", "C": "Optional", "D": "Removed" }
cs_0132
multiple_choice
en
How is kernel mode best described?
[ "Full hardware access.", "Privileged level.", "Select option B." ]
computer_science
Answer: Privileged. Steps: 1. Full hardware access. 2. Privileged level. 3. Select option B. Answer: (B)
operating_systems
Vlákno je lehká jednotka běhu sdílející paměť procesu.
null
cs_0133
concept
cs
Co je vlákno (thread)?
[ "Běží uvnitř procesu.", "Sdílí paměť.", "Vlastní zásobník." ]
computer_science
Answer: Lehká jednotka běhu. Steps: 1. Běží uvnitř procesu. 2. Sdílí paměť. 3. Vlastní zásobník.
operating_systems
Inodes store file metadata and block pointers.
null
cs_0134
concept
en
What is an inode?
[ "Metadata per file.", "Points to blocks.", "Name lives in directory." ]
computer_science
Answer: File metadata node. Steps: 1. Metadata per file. 2. Points to blocks. 3. Name lives in directory.
operating_systems
A mutex grants one holder at a time, ensuring mutual exclusion.
{ "A": "Mutual exclusion", "B": "Parallel access", "C": "No locking", "D": "Deadlock" }
cs_0135
multiple_choice
en
What does a mutex ensure?
[ "One holder only.", "Others wait.", "Select option A." ]
computer_science
Answer: Mutual exclusion. Steps: 1. One holder only. 2. Others wait. 3. Select option A. Answer: (A)
operating_systems
A class is a blueprint; objects are its instances.
null
cs_0136
concept
en
How do classes and objects differ?
[ "Class defines shape.", "Object holds data.", "Many objects per class." ]
computer_science
Answer: Blueprint versus instance. Steps: 1. Class defines shape. 2. Object holds data. 3. Many objects per class.
oop
The class is the blueprint; objects instantiate it.
{ "A": "Object", "B": "Class", "C": "Method", "D": "Field" }
cs_0137
multiple_choice
en
What is the blueprint?
[ "Blueprint defines.", "That is class.", "Select option B." ]
computer_science
Answer: Class. Steps: 1. Blueprint defines. 2. That is class. 3. Select option B. Answer: (B)
oop
Two increments raise count from 0 to 2.
null
cs_0138
worked_example
en
Counter starts at 0, inc() twice. What is count?
[ "Start 0.", "First inc: 1.", "Second inc: 2." ]
computer_science
Answer: 2. Steps: 1. Start 0. 2. First inc: 1. 3. Second inc: 2.
oop
Třída je předpis, objekt jeho konkrétní instance.
null
cs_0139
concept
cs
Co je třída a objekt?
[ "Třída definuje tvar.", "Objekt drží data.", "Mnoho objektů z třídy." ]
computer_science
Answer: Předpis versus instance. Steps: 1. Třída definuje tvar. 2. Objekt drží data. 3. Mnoho objektů z třídy.
oop
Encapsulation bundles data with methods and hides internals.
null
cs_0140
concept
en
What is encapsulation?
[ "Bundle data, methods.", "Hide internals.", "Expose interface." ]
computer_science
Answer: Bundled hidden data. Steps: 1. Bundle data, methods. 2. Hide internals. 3. Expose interface.
oop
Encapsulation hides internal details behind an interface.
{ "A": "Encapsulation", "B": "Inheritance", "C": "Polymorphism", "D": "Abstraction" }
cs_0141
multiple_choice
en
What hides internal details?
[ "Need hiding.", "That is encapsulation.", "Select option A." ]
computer_science
Answer: Encapsulation. Steps: 1. Need hiding. 2. That is encapsulation. 3. Select option A. Answer: (A)
oop
Dog inherits speak and returns 'woof'.
null
cs_0142
worked_example
en
Dog(Animal) defines speak() as 'woof'. What does Dog().speak() give?
[ "Dog inherits Animal.", "speak returns 'woof'.", "Result 'woof'." ]
computer_science
Answer: 'woof'. Steps: 1. Dog inherits Animal. 2. speak returns 'woof'. 3. Result 'woof'.
oop
Dědičnost přebírá vlastnosti rodičovské třídy.
null
cs_0143
concept
cs
Co je dědičnost?
[ "Potomek dědí.", "Rozšiřuje rodiče.", "Opakuje méně kódu." ]
computer_science
Answer: Přebírání od rodiče. Steps: 1. Potomek dědí. 2. Rozšiřuje rodiče. 3. Opakuje méně kódu.
oop
Polymorphism lets one interface behave differently per type.
{ "A": "Encapsulation", "B": "Inheritance", "C": "Polymorphism", "D": "Coupling" }
cs_0144
multiple_choice
en
What gives one interface many behaviors?
[ "Same call, varied act.", "That is polymorphism.", "Select option C." ]
computer_science
Answer: Polymorphism. Steps: 1. Same call, varied act. 2. That is polymorphism. 3. Select option C. Answer: (C)
oop
len() calls __len__, returning 3.
null
cs_0145
worked_example
en
A class defines __len__ returning 3. What is len(obj)?
[ "len calls __len__.", "Method returns 3.", "Result 3." ]
computer_science
Answer: 3. Steps: 1. len calls __len__. 2. Method returns 3. 3. Result 3.
oop
__init__ initializes new instances with starting state.
null
cs_0146
concept
en
What is a constructor in Python?
[ "Called at creation.", "Method __init__.", "Sets attributes." ]
computer_science
Answer: __init__ initializer. Steps: 1. Called at creation. 2. Method __init__. 3. Sets attributes.
oop
Rectangle(3, 4).area() = 3 x 4 = 12.
null
cs_0147
worked_example
en
Rectangle(3, 4).area() with area = w*h. What value?
[ "Width 3, height 4.", "Multiply: 12.", "Result 12." ]
computer_science
Answer: 12. Steps: 1. Width 3, height 4. 2. Multiply: 12. 3. Result 12.
oop
self refers to the current instance inside methods.
{ "A": "Class", "B": "Module", "C": "Parent", "D": "Instance" }
cs_0148
multiple_choice
en
What does self refer to?
[ "Method context.", "Current object.", "Select option D." ]
computer_science
Answer: Instance. Steps: 1. Method context. 2. Current object. 3. Select option D. Answer: (D)
oop
Polymorfismus umožňuje stejné rozhraní s různým chováním.
null
cs_0149
concept
cs
Co je polymorfismus?
[ "Stejné volání.", "Různé chování.", "Podle typu objektu." ]
computer_science
Answer: Jedno rozhraní, více chování. Steps: 1. Stejné volání. 2. Různé chování. 3. Podle typu objektu.
oop
Child overrides greet, so it returns 'hi child'.
null
cs_0150
worked_example
en
Child overrides greet() with 'hi child'. What does Child().greet() give?
[ "Child defines greet.", "Override wins.", "Result 'hi child'." ]
computer_science
Answer: 'hi child'. Steps: 1. Child defines greet. 2. Override wins. 3. Result 'hi child'.
oop