WGU D522 (Python) – Questions With Appropriate
Solutions
Save
Practice questions for this set
Learn 1 /7 Study using Learn
List
Choose an answer
Which data structure fits the requirements the best?
1 EX: Mutable, Ordered Sequence, Indexed, ability to add, remove or update, dynamic,
allows duplicates
2 What does read() do?
3 What does a '#' indicate within Python?
4 What is 'a' mode?
Don't know?
Terms in this set (45)
What does read() do? Reads data from a file
, What does input() do? gets user input from the console/terminal. Returns
what's typed as a string
What does write() do? Writes data to a file
What is 'w' mode? Write
What is 'a' mode? Append
What does print() do? Displays output to the console/screen. Mainly used
for seeing what code is doing or debugging.
What should be at the end of a Colon
functions definition?
What data structure do the brackets A List
indicate in the following example?
devices = ["router01", "switch01",
"modem01", "gateway01", "printer01"]
What data structure do the brackets A Tuple
indicate in the following example?
devices = ("router01", "switch01",
"modem01", "gateway01", "printer01")
What data structure do the brackets A Dictionary
indicate in the following example?
devices = {"router": "router01", "switch":
"switch01"}
What data structure do the brackets A Set
indicate in the following example?
Also there are no duplicates?
devices = {"router01", "switch01",
"modem01"}
What is this an example of? Concatenate
"Hello" + "World" = "HelloWorld"
Solutions
Save
Practice questions for this set
Learn 1 /7 Study using Learn
List
Choose an answer
Which data structure fits the requirements the best?
1 EX: Mutable, Ordered Sequence, Indexed, ability to add, remove or update, dynamic,
allows duplicates
2 What does read() do?
3 What does a '#' indicate within Python?
4 What is 'a' mode?
Don't know?
Terms in this set (45)
What does read() do? Reads data from a file
, What does input() do? gets user input from the console/terminal. Returns
what's typed as a string
What does write() do? Writes data to a file
What is 'w' mode? Write
What is 'a' mode? Append
What does print() do? Displays output to the console/screen. Mainly used
for seeing what code is doing or debugging.
What should be at the end of a Colon
functions definition?
What data structure do the brackets A List
indicate in the following example?
devices = ["router01", "switch01",
"modem01", "gateway01", "printer01"]
What data structure do the brackets A Tuple
indicate in the following example?
devices = ("router01", "switch01",
"modem01", "gateway01", "printer01")
What data structure do the brackets A Dictionary
indicate in the following example?
devices = {"router": "router01", "switch":
"switch01"}
What data structure do the brackets A Set
indicate in the following example?
Also there are no duplicates?
devices = {"router01", "switch01",
"modem01"}
What is this an example of? Concatenate
"Hello" + "World" = "HelloWorld"