Part 2, My python project Flashcards
describe what pythons
not keyword
is
This is a logical operator and can be used to create boolean expressions
describe how pythons
not keyword
works
The return value will be True if the statement(s) are not True, otherwise it will return False.
what is the python
list() function
used for
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 term used for the
list object value
this is known as an
index
what is an
interactive loop
this is a loop that relies on and can keep asking for user input
this is known as a
key
what is the term given to the
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
what is a
dictionary object value
this has a single parameter being
Prompt - A String, representing a default message before the input.
what are the parameters for the python
input() function
for a
list object value
what type of data is permitted
this only permits
consecutive positive integers, starting with 0
name three things that describe a
python dictionary
- this is a way of storing data within a program
- it is a python object
- it is a container
what are the parameters for the python
input() function
this has a single parameter being
Prompt - A String, representing a default message before the input.
what are the parameters for the python
choice() function
this has a single parameter being
Sequence - Required. A sequence like a list, a tuple, a range of numbers etc.
what is the term given to the
dictionary object value
this is known as a
key
- set the variable exit to false
- 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
what is the pattern for an
interactive loop
this has a single parameter being
Iterable - Required. A sequence, collection or an iterator object
what are the parameters for the python
list() function