Python Flashcards

(45 cards)

1
Q

variable

A

Stores and names a piece of data.

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

boolean

A

Data type that can only be True (1) or False (0).

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

string

A

Function that can contain letters, numbers, and symbols.

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

whitespace

A

Formatting used to properly structure code.

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

editor

A

Area within which code is written.

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

interpreter

A

Display that runs your code line by line while checking for any errors.

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

comment

A

#

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

comment block

A

””

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

addition

A

+

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

subtraction

A

-

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

multiplication

A

*

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

division

A

/

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

exponentiation

A

**

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

modulo division resulting in just the remainder

A

%

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

escape character

A

\

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

string length

A

len( )

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

remove string capitalization

A

.lower()

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

capitalize string

A

.upper()

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

convert selection to string

20
Q

print

A

Calls following code to display in console.

21
Q

combine variable with string(s)

A

“string text with &s and stuff” & (StrName)

22
Q

control flow

A

allowance to choose from outcomes based on what else is happening in the program

23
Q

comparator

A

checks a variable against another regarding the specified operation resulting in True or False

24
Q

equal to

25
not equal to
!=
26
less than
27
less than or equal to
28
greater than
\>
29
greater than or equal to
\>=
30
boolean operators
compares statements and results in boolean values
31
and
boolean operator that checks if both statements are True
32
or
boolean operator that checks if at least one statement is True
33
not
boolean operator that gives the opposite of the statement
34
order of boolean operators
( ) \> not \> and \> or
35
conditional statements
if, else, elif
36
if
conditional statement that runs a function after making sure the statement is True
37
else
conditional statement that runs a function in the event of all "if statements" being False
38
elif
conditional statement used to run a function when the original "if statement" is False but meets its own stated characteristics
39
raw\_input()
function that accepts a string (in the parentheses which can print as a solicitation prompt for the user) and assigns entered data to the specified prefixed variable as a string or other declared data type (like numerals)
40
function
a reusable section of code written to perform a specific task in a program
41
def
groups and sequesters relevant data regarding the function you name following the command
42
components of a function
header, must include the term "def," name of the function, and any required parameters; optional comment to explain its use; the body describing the procedures being carried out which MUST be indented similar to conditional statements
43
sleep
function that forces the program to delay the next line of code from processing for the amount of seconds indicated
44
\n
escape character to put following string contents on a new line
45
floating-point numbers
numbers represented in computer hardware as base 2 (binary) fractions \*remember that the display usually only shows a few numbers for ease of reading and fractions will never be exactly represented