CS12: 64 flashcards

All 64 flashcards from this kit, free and with no sign-up.

1. What is a function in Python?

Show the answer

A named block of reusable code that performs a specific task.

2. What is the difference between a function definition and a function call?

Show the answer

A definition creates the function (using `def`), while a call executes it.

3. What is a parameter?

Show the answer

A variable listed in a function definition that receives a value when the function is called.

4. What is an argument?

Show the answer

The actual value passed to a function when it is called.

5. What is a return statement used for?

Show the answer

To send a value back from a function to the caller.

6. What is a default parameter?

Show the answer

A parameter that has a default value if no argument is provided.

7. What is a local variable?

Show the answer

A variable defined inside a function, accessible only within that function.

8. What is a global variable?

Show the answer

A variable defined outside all functions, accessible throughout the program.

9. What is a list in Python?

Show the answer

An ordered, mutable collection of items.

10. What is a tuple in Python?

Show the answer

An ordered, immutable collection of items.

11. What is a dictionary in Python?

Show the answer

An unordered collection of key-value pairs.

12. What is the difference between `append()` and `extend()` for lists?

Show the answer

`append()` adds a single element to the end; `extend()` adds all elements of an iterable to the end.

13. What does the `pop()` method do for lists?

Show the answer

Removes and returns the last element (or element at given index).

14. What is a stack?

Show the answer

A linear data structure following Last-In-First-Out (LIFO) order.

15. What is a queue?

Show the answer

A linear data structure following First-In-First-Out (FIFO) order.

16. What is a database?

Show the answer

An organized collection of data stored electronically.

17. What is a primary key?

Show the answer

A field that uniquely identifies each record in a table.

18. What is a foreign key?

Show the answer

A field that links to the primary key of another table.

19. What is the purpose of the `SELECT` statement in SQL?

Show the answer

To retrieve data from a database table.

20. What does the `WHERE` clause do in SQL?

Show the answer

Filters records based on a condition.

21. What is the difference between `DELETE` and `DROP` in SQL?

Show the answer

`DELETE` removes rows; `DROP` removes the entire table structure.

22. What is a computer network?

Show the answer

A collection of interconnected devices that share resources and data.

23. What is a protocol?

Show the answer

A set of rules governing data communication between devices.

24. What is the full form of HTTP?

Show the answer

HyperText Transfer Protocol.

25. What is the full form of TCP/IP?

Show the answer

Transmission Control Protocol/Internet Protocol.

26. What is a URL?

Show the answer

Uniform Resource Locator, the address of a resource on the web.

27. What is a domain name?

Show the answer

A human-readable name that maps to an IP address.

28. What is the purpose of DNS?

Show the answer

Domain Name System translates domain names to IP addresses.

29. What is a firewall?

Show the answer

A security system that monitors and controls incoming and outgoing network traffic.

30. What is a cybercrime?

Show the answer

Illegal activities committed using computers or the internet.

31. What is phishing?

Show the answer

A fraudulent attempt to obtain sensitive information by disguising as a trustworthy entity.

32. What is a computer virus?

Show the answer

A malicious program that replicates itself and damages files or systems.

33. What is the difference between a virus and a worm?

Show the answer

A virus needs a host file; a worm spreads independently over networks.

34. What is a trojan horse?

Show the answer

Malware disguised as legitimate software.

35. What is encryption?

Show the answer

The process of converting data into a coded form to prevent unauthorized access.

36. What is the difference between `=` and `==` in Python?

Show the answer

`=` is assignment; `==` is comparison.

37. What is an operator in Python?

Show the answer

A symbol that performs an operation on operands.

38. What is the purpose of the `in` operator?

Show the answer

Checks if a value exists in a sequence (e.g., list, string).

39. What is a loop?

Show the answer

A control structure that repeats a block of code.

40. What is the difference between `for` and `while` loops?

Show the answer

`for` iterates over a sequence; `while` repeats while a condition is true.

41. What is a conditional statement?

Show the answer

A statement that executes code based on a condition (e.g., `if`, `elif`, `else`).

42. What is a syntax error?

Show the answer

An error in the structure of code that prevents execution.

43. What is a logical error?

Show the answer

An error where the program runs but produces incorrect results.

44. What is a runtime error?

Show the answer

An error that occurs during program execution (e.g., division by zero).

45. What is the purpose of the `try` and `except` blocks?

Show the answer

To handle exceptions and prevent program crashes.

46. What is a module in Python?

Show the answer

A file containing Python code (functions, classes, variables) that can be imported.

47. What is the difference between `import module` and `from module import name`?

Show the answer

`import module` imports the whole module; `from module import name` imports specific attributes.

48. What is a package in Python?

Show the answer

A directory containing multiple modules and an `__init__.py` file.

49. What is the purpose of the `random` module?

Show the answer

To generate random numbers and make random selections.

50. What is the purpose of the `math` module?

Show the answer

To access mathematical functions like `sqrt`, `ceil`, `floor`.

51. What is a relational database?

Show the answer

A database that stores data in tables with relationships between them.

52. What is SQL?

Show the answer

Structured Query Language, used to manage relational databases.

53. What is the difference between `CHAR` and `VARCHAR` data types?

Show the answer

`CHAR` is fixed-length; `VARCHAR` is variable-length.

54. What is the purpose of the `ORDER BY` clause?

Show the answer

To sort the result set in ascending or descending order.

55. What is the purpose of the `GROUP BY` clause?

Show the answer

To group rows with the same values into summary rows.

56. What is a network topology?

Show the answer

The arrangement of devices and connections in a network.

57. What is a star topology?

Show the answer

A topology where all devices connect to a central hub or switch.

58. What is a bus topology?

Show the answer

A topology where all devices share a single communication line.

59. What is a router?

Show the answer

A device that forwards data packets between networks.

60. What is a switch?

Show the answer

A device that connects devices within a network and forwards data to specific devices.

61. What is the difference between IPv4 and IPv6?

Show the answer

IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.

62. What is a cookie?

Show the answer

A small piece of data stored by a website on the user's computer.

63. What is the purpose of the `ALTER TABLE` statement?

Show the answer

To modify the structure of an existing table.

64. What is the purpose of the `UPDATE` statement?

Show the answer

To modify existing records in a table.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages