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
Q

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

A

describe how pythons

not keyword

works

26
Q

this only permits

consecutive positive integers, starting with 0

A

for a

list object value

what type of data is permitted

27
Q

what is the data structure of a

python dictionary

A

this holds data as key-value pairs

28
Q

what is a

dictionary value

A

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

29
Q
  1. this is a way of storing data within a program
  2. it is a python object
  3. it is a container
A

name three things that describe a

python dictionary

30
Q

this holds data as key-value pairs

A

what is the data structure of a

python dictionary

31
Q

This is part of the random module and

returns a randomly selected element from the specified sequence

A

what is the python

choice() function

used for

32
Q

what is the pattern for an

interactive loop

A
  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
Q

what are the parameters for the python

list() function

A

this has a single parameter being

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

34
Q

what is a

dictionary object value

A

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
Q

what is a

Continuation condition

A

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

36
Q

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

A

what is the python

list() function

used for

37
Q

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

A

what is an

interactive loop

38
Q

this permits

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

A

for a

dictionary object value

what type of data is permitted