IT-Phython 3 Flashcards

(18 cards)

1
Q

What is evaluation in Python?

A

Determining the value of an expression as True or False

Evaluation is crucial for decision-making in code.

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 essential 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 comparison operators used in Python?

A
  • ==
  • !=
  • <
  • >

These operators are used to compare values.

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

What do the logical operators and and or do?

A

Apply logic operations to conditions

They are used to combine multiple conditions.

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

Indentation helps Python understand the scope of code blocks.

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

Define a condition in programming.

A

An expression that can be evaluated as either true or false

Conditions are fundamental for control flow in programs.

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

What are the if, then, else statements used for?

A

Making code run depending on whether a statement is true or false

These statements are key for decision-making in code.

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

What does scope define in a program?

A

Which code belongs to which part of the program

Scope is important for variable accessibility.

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

What does sequence refer to in programming?

A

Code running one line at a time in order

Sequence is the default flow of execution in a program.

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 essential for data manipulation in programming.

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 can be used in a program.

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

Define a string.

A

A text-based value

Strings are commonly used for handling text in programming.

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 a basic data type used 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 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 an essential part of software development.

17
Q

What does IDE stand for?

A

Integrated Development Environment

IDEs provide tools for writing and testing code.

18
Q

What is syntax in programming?

A

The correct structure or layout of code

Syntax errors can prevent code from running properly.