Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions computer-science/basics/answers/marianne.md
Original file line number Diff line number Diff line change
@@ -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.