Part 2, My python project Flashcards

1
Q

describe what pythons

not keyword

is

A

This is a logical operator and can be used to create boolean expressions

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

describe how pythons

not keyword

works

A

The return value will be True if the statement(s) are not True, otherwise it will return False.

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

what is the python

list() function

used for

A

This function creates a list object.

for example

When a dictionary is given as an argument it will create a list of all the keys within the dictionary

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

what is the term used for the

list object value

A

this is known as an

index

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

what is an

interactive loop

A

this is a loop that relies on and can keep asking for user input

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

this is known as a

key

A

what is the term given to the

dictionary object value

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

this refers to the value of the dictionary object itself. The value itself is known as a key and is attached to a dictionary value. A key cannot be a list or another dictionary

A

what is a

dictionary object value

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

this has a single parameter being

Prompt - A String, representing a default message before the input.

A

what are the parameters for the python

input() function

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

for a

list object value

what type of data is permitted

A

this only permits

consecutive positive integers, starting with 0

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

name three things that describe a

python dictionary

A
  1. this is a way of storing data within a program
  2. it is a python object
  3. it is a container
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what are the parameters for the python

input() function

A

this has a single parameter being

Prompt - A String, representing a default message before the input.

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

what are the parameters for the python

choice() function

A

this has a single parameter being

Sequence - Required. A sequence like a list, a tuple, a range of numbers etc.

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

what is the term given to the

dictionary object value

A

this is known as a

key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. set the variable exit to false
  2. while exit is equal to false:
    2a. set the variable user_input to the response to ‘Type your input here: ’
    2b. if the user_input is ‘quit’
    2bi. set the variable exit to true
    2c. otherwise if user_input has some value(s)
    2ci. do something
    2d. otherwise if user_input has some other value(s)
    2di. do something else
    2e. …
    2f. otherwise
    2fi. do something else
A

what is the pattern for an

interactive loop

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

this has a single parameter being

Iterable - Required. A sequence, collection or an iterator object

A

what are the parameters for the python

list() function

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

what is the python

choice() function

used for

A

This is part of the random module and

returns a randomly selected element from the specified sequence

17
Q

this is a value that is attached to a dictionary key the value itself can be of any type

A

what is a

dictionary value

18
Q

for a

dictionary object value

what type of data is permitted

A

this permits

most types as its value, for example, numbers and strings, but not lists and dictionaries

19
Q

what is the python

input() function

used for

A

This function allows for user input

20
Q

This function allows for user input

A

what is the python

input() function

used for

21
Q

this is a condition that will allow a loop to continue on to the next iteration

A

what is a

Continuation condition

22
Q

This is a logical operator and can be used to create boolean expressions

A

describe what pythons

not keyword

is

23
Q

this has a single parameter being

Sequence - Required. A sequence like a list, a tuple, a range of numbers etc.

A

what are the parameters for the python

choice() function

24
Q

this is known as an

index

A

what is the term used for the

list object value

25
The return value will be True if the statement(s) are not True, otherwise it will return False.
describe how pythons **not keyword** works
26
this only permits ## Footnote **consecutive positive integers, starting with 0**
for a **list object value** what type of data is permitted
27
what is the data structure of a ## Footnote **python dictionary**
this holds data as key-value pairs
28
what is a ## Footnote **dictionary value**
this is a value that is attached to a dictionary key the value itself can be of any type
29
1. this is a way of storing data within a program 2. it is a python object 3. it is a container
name three things that describe a ## Footnote **python dictionary**
30
this holds data as key-value pairs
what is the data structure of a ## Footnote **python dictionary**
31
This is part of the random module and ## Footnote **returns a randomly selected element from the specified sequence**
what is the python **choice() function** used for
32
what is the pattern for an ## Footnote **interactive loop**
1. set the variable exit to false 2. while exit is equal to false: 2a. set the variable user\_input to the response to ‘Type your input here: ’ 2b. if the user\_input is ‘quit’ 2bi. set the variable exit to true 2c. otherwise if user\_input has some value(s) 2ci. do something 2d. otherwise if user\_input has some other value(s) 2di. do something else 2e. ... 2f. otherwise 2fi. do something else
33
what are the parameters for the python ## Footnote **list() function**
this has a single parameter being ## Footnote **Iterable - Required. A sequence, collection or an iterator object**
34
what is a ## Footnote **dictionary object value**
this refers to the value of the dictionary object itself. The value itself is known as a key and is attached to a dictionary value. A key cannot be a list or another dictionary
35
what is a ## Footnote **Continuation condition**
this is a condition that will allow a loop to continue on to the next iteration
36
This function creates a list object. _for example_ When a dictionary is given as an argument it will create a list of all the keys within the dictionary
what is the python **list() function** used for
37
this is a loop that relies on and can keep asking for user input
what is an ## Footnote **interactive loop**
38
this permits ## Footnote **most types as its value, for example, numbers and strings, but not lists and dictionaries**
for a **dictionary object value** what type of data is permitted