Python Flashcards

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

A

str( )

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

A

==

25
Q

not equal to

A

!=

26
Q

less than

A
27
Q

less than or equal to

A
28
Q

greater than

A

>

29
Q

greater than or equal to

A

>=

30
Q

boolean operators

A

compares statements and results in boolean values

31
Q

and

A

boolean operator that checks if both statements are True

32
Q

or

A

boolean operator that checks if at least one statement is True

33
Q

not

A

boolean operator that gives the opposite of the statement

34
Q

order of boolean operators

A

( ) > not > and > or

35
Q

conditional statements

A

if, else, elif

36
Q

if

A

conditional statement that runs a function after making sure the statement is True

37
Q

else

A

conditional statement that runs a function in the event of all “if statements” being False

38
Q

elif

A

conditional statement used to run a function when the original “if statement” is False but meets its own stated characteristics

39
Q

raw_input()

A

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
Q

function

A

a reusable section of code written to perform a specific task in a program

41
Q

def

A

groups and sequesters relevant data regarding the function you name following the command

42
Q

components of a function

A

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
Q

sleep

A

function that forces the program to delay the next line of code from processing for the amount of seconds indicated

44
Q

\n

A

escape character to put following string contents on a new line

45
Q

floating-point numbers

A

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