Question 16
Selectable Answer
What is the expected behavior of the following code?
Show Answer
Answer:
Question 17
Selectable Answer
What is the expected output of the following snippet?
Show Answer
Answer:
Question 18
Selectable Answer
If you want to transform a string into a list of words, what invocation would you use? (Select two answers)
Expected output:
Show Answer
Answer:
Question 19
Selectable Answer
A property that stores information about a given class's super-classes is named:
Show Answer
Answer:
Question 20
Selectable Answer
Python strings can be “glued” together using the operator:
Show Answer
Answer: Explanation:
Reference: https://docs.python.org/3/tutorial/introduction.html
Question 21
Selectable Answer
You are going to read 16 bytes from a binary file into a bytearray called data .
Which lines would you use?
Show Answer
Answer: Explanation:
https://docs.python.org/3/library/functions.html#func-bytearray https://docs.python.org/3/library/io.html
Question 22
Selectable Answer
Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)
Show Answer
Answer:
Question 23
Selectable Answer
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
Show Answer
Answer:
Question 24
Selectable Answer
What is the expected behavior of the following code?
It will:
Show Answer
Answer:
Question 25
Selectable Answer
What is the expected behavior of the following code?
Show Answer
Answer:
Question 26
Selectable Answer
Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)
Show Answer
Answer:
Question 27
Selectable Answer
How many elements will the list1 list contain after execution of the following snippet?
Show Answer
Answer:
Question 28
Selectable Answer
What is the expected behavior of the following code?
Show Answer
Answer:
Question 29
Selectable Answer
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
Show Answer
Answer: Explanation:
Reference: https://stackoverflow.com/questions/32613375/python-2-7-exception-handling-syntax
Question 30
Selectable Answer
What is the expected behavior of the following code?
It will:
Show Answer
Answer: