Quiz 1 Flashcards
Algorithm is defined as an infinite sequence of instructions.
True
False
F
All collections are indexed and ordered.
True
False
F
Data are stored in computers as characters.
True
False
F
Data structures make it easy for users to access and work with the data they need in appropriate ways
True
False
T
Collections is a user-define functions in python module that provides useful container datatypes
True
False
F
What kind of collection is A= [3,6,8,9,2]?
dictionary
tuple
list
set
list
All methods and functions is applicable to tuples only.
True
False
F
Tuples are written with ____
()
{}
[]
()
The way to declare a set collection is as follows:
set={ “a”:2,”b”:1}
True
False
F
You cannot add items to a Lists once it is created.
True
False
F
You can use the mode “r” to read and write in a text file.
True
False
F
The process mode w+ and a+ are the same.
True
False
F
The b mode in file handling is used for binary only.
True
False
T
The key function for working files in Python is the write () function
True
False
F
The mode “r+”, indicated both read and write.
True
False
T
The read() function is used to read a part of the text file.
True
False
F
An empty dictionary without any items is written with just ()
True
False
F
Keys/keynames are unique within a dictionary while values may not be.
True
False
T
Changing the value of a specific item in a dictionary be referring to its key value.
True
False
F
Choose two ways to formulate a good algorithm. design patterns abstract structure data analysis Data structure
Data structure
design patterns