diff --git a/computer-science/basics/answers/marianne.md b/computer-science/basics/answers/marianne.md new file mode 100644 index 0000000..1ec79e2 --- /dev/null +++ b/computer-science/basics/answers/marianne.md @@ -0,0 +1,33 @@ +What is data? + A. Information stored and processed by a computer +What is an algorithm? + A. A step-by-step set of instructions for solving a problem or accomplishing a task. +What is a function? + A. A reusable block of code that takes inputs (parameters), does something, and optionally returns an output. +What is function scope? What is a block scope? What is global scope? + A. Scope determines where variables are accessible. Function scope means a variable exists only inside that function. Block scope means it exists only inside a specific block (like an if or for). Global scope means it's accessible everywhere in the program. +What is a variable? + A. A named container that stores a value. The value can change over time. +What is a data type? + A. A classification that tells the computer what kind of value a variable holds (number, string, boolean, etc.) and what operations can be performed on it. +What is a data structure? What are some examples? + A. A way of organizing and storing data for efficient access and modification. Examples: arrays (ordered lists), objects/dictionaries (key-value pairs), stacks, queues, trees. +What is a web server? + A. A computer (or software) that listens for requests over the internet and responds with data - like HTML pages, JSON, or files. +What is an operator? + A. A symbol that performs an operation on values. Examples: + (addition), === (equality check), && (logical AND). +What is a character? A string? + A. A character is a single letter, number, or symbol. A string is a sequence of characters (text). +What is state? Why is it important? + A. State is the current data/values an application is holding at any given moment. It's important because apps need to remember things (user input, fetched data, UI status) to behave correctly. +What is an interface? + A. A shared boundary where two systems meet and interact - it defines how they communicate without exposing internal details. In code, it often means a contract specifying what methods/properties something must have. +What is an API? + A. Application Programming Interface - a set of rules and endpoints that let different software systems talk to each other. + +// Advanced // + +What are calculations (e.g. “pure functions”)? + A. Functions that take inputs and return outputs without affecting anything outside themselves. Given the same inputs, they always return the same result. Example: a function that adds two numbers. +What are actions (e.g. “side-effectful functions”)? + A. Functions that interact with the outside world or change state beyond just returning a value. Examples: saving to a database, sending an email, logging to the console, modifying a global variable. \ No newline at end of file