What is the expected behavior of the following code?
A. it outputs 1
B. it outputs 2
C. the code is erroneous and it will not execute
D. it outputs 3
Which of the following lambda function definitions are correct? (Select two answers)
A. lambda X : None
B. lambda : 3,1415
C. lambda x : def fun(x): return x
D. lambda lambda: lambda * lambda
What is the expected output of the following code?
A. 4
B. 16
C. an exception is raised
D. 1
Which of the following expressions evaluate to True? (Select two answers)
A. 121 + 1 != '!' + 2 * '2'
B. 'AbC' lower () < 'AB'
C. '1' + '1' + '1' < '1' * 3'
D. '3.14' != str(3.1415)
What is the expected behavior of the following code?
A. it outputs 0
B. it outputs 1
C. it raises an exception
D. it outputs 2
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
A. 2 2
B. 1 3
C. 1 2 3
D. 2 2 3
Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)
A. 'var' in Object.__dict__
B. 'prop' in Class.__dict
C. len(Object.__diet__) == 1
D. 'var1 in Class, dict
What is the expected behavior of the following code?
A. it outputs 2
B. the code is erroneous and it will not execute
C. it outputs 1
D. it outputs 3
What is the expected output of the following code if existing_file is the name of a file located inside the working directory?
A. 1 2
B. 1 2 3
C. 1 3
D. 2 3
Which of the following statements are true? (Select two answers)
A. \e is an escape sequence used to mark the end of lines
B. ASCII is synonymous with UTF-8
C. II in ASCII stands for Information Interchange
D. a code point is a number assigned to a given character