programming fundamentals Flashcards

(34 cards)

1
Q

What is a variable?

A

It is a named memory address that holds a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do you call a variable name?

A

Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What criteria must a variable meet?

A
  1. it can contain letters and numbers, but cannot start with a number.
  2. must contain a letter
  3. cannot contain special letters
  4. it should contain lower case letters
  5. it should represent the value it is holding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an integer?

A

A whole number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a float?

A

Decimal numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a character?

A

A single alphanumeric character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define algorithm.

A

A step-by-step procedure for solving a problem or performing a task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True or false: Variables can store different types of data.

A

TRUE

Variables can hold integers, strings, booleans, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Fill in the blank: A loop is used to _______ a set of instructions repeatedly.

A

execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a function in programming?

A

A reusable block of code that performs a specific task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define syntax.

A

The set of rules that defines the combinations of symbols in a programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does debugging mean?

A

The process of identifying and removing errors from computer code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or false: Comments in code are executed by the program.

A

FALSE

Comments are ignored by the compiler or interpreter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: A conditional statement allows the program to _______ based on a condition.

17
Q

What is a data structure?

A

A way of organizing and storing data for efficient access and modification.

18
Q

Define array.

A

A collection of items stored at contiguous memory locations.

19
Q

What is iteration?

A

The repetition of a process or set of instructions in programming.

20
Q

True or false: Object-oriented programming focuses on objects rather than actions.

A

TRUE

It emphasizes encapsulation, inheritance, and polymorphism.

21
Q

Fill in the blank: A boolean data type can hold _______.

A

true or false

22
Q

What is compilation?

A

The process of converting source code into executable code.

23
Q

Define syntax error.

A

An error in the code that violates the rules of the programming language.

24
Q

What is a loop control variable?

A

A variable that determines how many times a loop will execute.

25
True or false: Recursion is a function that calls itself.
TRUE ## Footnote It is often used to solve problems that can be broken down into smaller subproblems.
26
Fill in the blank: A string is a sequence of _______.
characters
27
What is inheritance in programming?
A mechanism where a new class derives properties from an existing class.
28
Define variable scope.
The context in which a variable is accessible within the code.
29
What does API stand for?
Application Programming Interface.
30
True or false: exception handling is used to manage errors in code.
TRUE ## Footnote It allows the program to continue running or to fail gracefully.
31
Fill in the blank: A library is a collection of pre-written _______.
code functions
32
What is a syntax highlighting feature?
A feature that displays code in different colors and fonts according to its syntax.
33
Define input/output (I/O).
The communication between an information processing system and the outside world.
34
What is software development life cycle (SDLC)?
A process for planning, creating, testing, and deploying software.