Flashcards
Tap a card to flip it
64 flashcards in this kit — the app reviews them with
spaced repetition so the right card returns on the right day.
Question
What is a function in Python?
tap to flip ↻
Answer
A named block of reusable code that performs a specific task.
Question
What is the difference between a function definition and a function call?
tap to flip ↻
Answer
A definition creates the function (using `def`), while a call executes it.
Question
What is a parameter?
tap to flip ↻
Answer
A variable listed in a function definition that receives a value when the function is called.
Question
What is an argument?
tap to flip ↻
Answer
The actual value passed to a function when it is called.
Question
What is a return statement used for?
tap to flip ↻
Answer
To send a value back from a function to the caller.
Question
What is a default parameter?
tap to flip ↻
Answer
A parameter that has a default value if no argument is provided.
Question
What is a local variable?
tap to flip ↻
Answer
A variable defined inside a function, accessible only within that function.
Question
What is a global variable?
tap to flip ↻
Answer
A variable defined outside all functions, accessible throughout the program.
Question
What is a list in Python?
tap to flip ↻
Answer
An ordered, mutable collection of items.
Question
What is a tuple in Python?
tap to flip ↻
Answer
An ordered, immutable collection of items.
Question
What is a dictionary in Python?
tap to flip ↻
Answer
An unordered collection of key-value pairs.
Question
What is the difference between `append()` and `extend()` for lists?
tap to flip ↻
Answer
`append()` adds a single element to the end; `extend()` adds all elements of an iterable to the end.
Question
What does the `pop()` method do for lists?
tap to flip ↻
Answer
Removes and returns the last element (or element at given index).
Question
What is a stack?
tap to flip ↻
Answer
A linear data structure following Last-In-First-Out (LIFO) order.
Question
What is a queue?
tap to flip ↻
Answer
A linear data structure following First-In-First-Out (FIFO) order.
Question
What is a database?
tap to flip ↻
Answer
An organized collection of data stored electronically.
Question
What is a primary key?
tap to flip ↻
Answer
A field that uniquely identifies each record in a table.
Question
What is a foreign key?
tap to flip ↻
Answer
A field that links to the primary key of another table.
Question
What is the purpose of the `SELECT` statement in SQL?
tap to flip ↻
Answer
To retrieve data from a database table.
Question
What does the `WHERE` clause do in SQL?
tap to flip ↻
Answer
Filters records based on a condition.
Question
What is the difference between `DELETE` and `DROP` in SQL?
tap to flip ↻
Answer
`DELETE` removes rows; `DROP` removes the entire table structure.
Question
What is a computer network?
tap to flip ↻
Answer
A collection of interconnected devices that share resources and data.
Question
What is a protocol?
tap to flip ↻
Answer
A set of rules governing data communication between devices.
Question
What is the full form of HTTP?
tap to flip ↻
Answer
HyperText Transfer Protocol.
Question
What is the full form of TCP/IP?
tap to flip ↻
Answer
Transmission Control Protocol/Internet Protocol.
Question
What is a URL?
tap to flip ↻
Answer
Uniform Resource Locator, the address of a resource on the web.
Question
What is a domain name?
tap to flip ↻
Answer
A human-readable name that maps to an IP address.
Question
What is the purpose of DNS?
tap to flip ↻
Answer
Domain Name System translates domain names to IP addresses.
Question
What is a firewall?
tap to flip ↻
Answer
A security system that monitors and controls incoming and outgoing network traffic.
Question
What is a cybercrime?
tap to flip ↻
Answer
Illegal activities committed using computers or the internet.
Question
What is phishing?
tap to flip ↻
Answer
A fraudulent attempt to obtain sensitive information by disguising as a trustworthy entity.
Question
What is a computer virus?
tap to flip ↻
Answer
A malicious program that replicates itself and damages files or systems.
Question
What is the difference between a virus and a worm?
tap to flip ↻
Answer
A virus needs a host file; a worm spreads independently over networks.
Question
What is a trojan horse?
tap to flip ↻
Answer
Malware disguised as legitimate software.
Question
What is encryption?
tap to flip ↻
Answer
The process of converting data into a coded form to prevent unauthorized access.
Question
What is the difference between `=` and `==` in Python?
tap to flip ↻
Answer
`=` is assignment; `==` is comparison.
Question
What is an operator in Python?
tap to flip ↻
Answer
A symbol that performs an operation on operands.
Question
What is the purpose of the `in` operator?
tap to flip ↻
Answer
Checks if a value exists in a sequence (e.g., list, string).
Question
What is a loop?
tap to flip ↻
Answer
A control structure that repeats a block of code.
Question
What is the difference between `for` and `while` loops?
tap to flip ↻
Answer
`for` iterates over a sequence; `while` repeats while a condition is true.
Question
What is a conditional statement?
tap to flip ↻
Answer
A statement that executes code based on a condition (e.g., `if`, `elif`, `else`).
Question
What is a syntax error?
tap to flip ↻
Answer
An error in the structure of code that prevents execution.
Question
What is a logical error?
tap to flip ↻
Answer
An error where the program runs but produces incorrect results.
Question
What is a runtime error?
tap to flip ↻
Answer
An error that occurs during program execution (e.g., division by zero).
Question
What is the purpose of the `try` and `except` blocks?
tap to flip ↻
Answer
To handle exceptions and prevent program crashes.
Question
What is a module in Python?
tap to flip ↻
Answer
A file containing Python code (functions, classes, variables) that can be imported.
Question
What is the difference between `import module` and `from module import name`?
tap to flip ↻
Answer
`import module` imports the whole module; `from module import name` imports specific attributes.
Question
What is a package in Python?
tap to flip ↻
Answer
A directory containing multiple modules and an `__init__.py` file.
Question
What is the purpose of the `random` module?
tap to flip ↻
Answer
To generate random numbers and make random selections.
Question
What is the purpose of the `math` module?
tap to flip ↻
Answer
To access mathematical functions like `sqrt`, `ceil`, `floor`.
Question
What is a relational database?
tap to flip ↻
Answer
A database that stores data in tables with relationships between them.
Question
What is SQL?
tap to flip ↻
Answer
Structured Query Language, used to manage relational databases.
Question
What is the difference between `CHAR` and `VARCHAR` data types?
tap to flip ↻
Answer
`CHAR` is fixed-length; `VARCHAR` is variable-length.
Question
What is the purpose of the `ORDER BY` clause?
tap to flip ↻
Answer
To sort the result set in ascending or descending order.
Question
What is the purpose of the `GROUP BY` clause?
tap to flip ↻
Answer
To group rows with the same values into summary rows.
Question
What is a network topology?
tap to flip ↻
Answer
The arrangement of devices and connections in a network.
Question
What is a star topology?
tap to flip ↻
Answer
A topology where all devices connect to a central hub or switch.
Question
What is a bus topology?
tap to flip ↻
Answer
A topology where all devices share a single communication line.
Question
What is a router?
tap to flip ↻
Answer
A device that forwards data packets between networks.
Question
What is a switch?
tap to flip ↻
Answer
A device that connects devices within a network and forwards data to specific devices.
Question
What is the difference between IPv4 and IPv6?
tap to flip ↻
Answer
IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.
Question
What is a cookie?
tap to flip ↻
Answer
A small piece of data stored by a website on the user's computer.
Question
What is the purpose of the `ALTER TABLE` statement?
tap to flip ↻
Answer
To modify the structure of an existing table.
Question
What is the purpose of the `UPDATE` statement?
tap to flip ↻
Answer
To modify existing records in a table.