Fundamentals & Vocabulary Flashcards
What is an algorithm?
An algorithm is a step-by-step procedure or formula used to solve a problem or achieve a task in programming.
Can you explain what a data structure is?
Sure! A data structure is a way of organizing and storing data in a computer so that it can be accessed and modified efficiently.
What do you mean by a variable in programming?
A variable is like a named storage location in computer memory that holds a value, such as a number or a piece of text.
Could you define a function?
Absolutely! A function is a block of code that performs a specific task and can be reused throughout a program to avoid repetition.
How would you describe a loop?
A loop is a programming construct that repeats a block of code until a specified condition is met, allowing for efficient repetition in code execution.
What exactly is a condition in programming?
A condition is a statement that evaluates whether a given condition is true or false, controlling the flow of a program by directing it to different paths based on the evaluation result.
Could you explain what an array is?
An array is a data structure used to store a collection of elements, each identified by an index or key, allowing for efficient storage and retrieval of related data.
Can you clarify the concept of a string?
Certainly! A string is a sequence of characters, typically used to represent text in computer programs, such as words or sentences.
What is a Boolean in programming?
A Boolean is a data type that represents true or false values, commonly used for logical operations and conditional expressions in programming.
How would you define an integer?
An integer is a data type that represents whole numbers, both positive and negative, without fractional parts, making it suitable for arithmetic operations and counting in programming.
What is the difference between a parameter and an argument?
In programming, a parameter is a variable in a function definition, while an argument is the actual value passed to the function.
Could you explain the concept of scope?
Scope refers to the visibility and accessibility of variables within a program, determining where in the code a variable can be referenced.
What does it mean to “declare” a variable?
To declare a variable in programming is to define its name and data type, allocating memory space for storing its value.
Can you define “syntax” in programming?
Syntax refers to the set of rules governing the structure and format of statements in a programming language, ensuring code correctness and readability.
What is the purpose of code comments?
Comments are used to provide explanations or annotations within code, helping developers understand its logic and functionality.