PYTHON Flashcards

(20 cards)

1
Q

What is Python?

A

A high-level, easy-to-read programming language

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

What is a variable?

A

A name that stores a value

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

What is a data type?

A

A classification of data, like int or str

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 without decimals

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

What is a string?

A

Text enclosed in quotes

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

What does input() do?

A

Takes data from the user

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

What does print() do?

A

Outputs text or data

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

What is assignment?

A

Giving a value to a variable

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

What is an if statement?

A

A structure used to make decisions

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

What is else used for?

A

Running code if the ‘if’ condition is false

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

What is elif?

A

Additional condition after an if statement

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

What is a loop?

A

Code that repeats multiple times

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

What is a while loop?

A

Repeats while a condition is true

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

What is a for loop?

A

Repeats a set number of times

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

What is indentation?

A

Spaces that show code blocks in Python

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

What is a syntax error?

A

Mistake in code rules that stops the program

17
Q

What is debugging?

A

Identifying and fixing errors

18
Q

What is a function?

A

A reusable block of code

19
Q

What does return do in a function?

A

Sends a value back to the caller

20
Q

What is a comment in Python?

A

Notes in code using #