Python 2 Flashcards

(18 cards)

1
Q

What is Evaluation in programming?

A

Determining the value of an expression as True or False

Evaluation is a fundamental concept in programming that helps in decision-making.

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

What does Selection enable computers to do?

A

Perform different actions based on if conditions are true or false

Selection is crucial for controlling the flow of a program.

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

What are the different comparison operators used in Python?

A
  • ==
  • !=
  • <
  • >

These operators are used to compare values in conditional statements.

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

What are the logical operators and and or used for?

A

Applying logic operations to conditions

These operators help in combining multiple conditions in decision-making.

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

What is Indentation in Python?

A

Adding spaces to the start of lines of code to define scope

Indentation is critical for Python to understand the structure of the code.

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

What is a Condition in programming?

A

An expression that can be evaluated as either true or false

Conditions are essential for making decisions in code.

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

What do the terms if, then, and else refer to?

A

Tools for making code run depending on whether a statement is true or false

These are fundamental constructs in control flow.

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

What does Scope define in programming?

A

Which code belongs to which part of the program

Scope is important for variable accessibility and management.

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

What is meant by Sequence in programming?

A

Code running one line at a time in order

Sequence is the default mode of execution in programming.

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

What is Code?

A

The instructions within a program

Code is the foundation of any software application.

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

What is a Variable?

A

A stored value in your program that is referenced by a name

Variables are used to hold data that can change during program execution.

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

What is a Data type?

A

Defines the type of data stored in a variable (string, integer)

Data types determine how data is handled in programming.

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

What is a String?

A

A text-based value

Strings are commonly used to represent textual data.

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

What is an Integer?

A

A whole number

Integers are used for counting and indexing in programming.

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

What is a Bug?

A

A problem with a program not behaving as intended

Bugs can lead to unexpected behavior and errors in software.

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

What is Debugging?

A

The process of finding and correcting bugs

Debugging is essential for ensuring software reliability.

17
Q

What does IDE stand for?

A

Integrated Development Environment

IDEs provide tools for writing, testing, and debugging code.

18
Q

What is Syntax in programming?

A

The correct structure or layout of code

Syntax errors can prevent code from running properly.