What is the expected output of the following code?
A. 8
B. 7.0
C. 8.0
D. 9.0
What would you insert instead of ???, so that the program prints True to the monitor?
A. x < y
B. x is not y
C. x is y
D. x != y
What is the output of the following snippet?
A. 25.0
B. The snippet will cause an execution error.
C. 17.0
D. 17
What is the expected output of the following code?
A. 1 | False 2 | True 3 | False 4 | True
B. 1 | False 2 | True 3 | True 4 | True
C. 1 | False 2 | True 3 | True 4 | False
D. 1 | False 2 | False 3 | True 4 | True
What is the expected output of the following code?
A. 0 1
B. 1 0
C. The code is erroneous.
D. 0 0
E. 1 1
What do you call a tool that lets you launch your code step-by-step and inspect it at each moment of execution?
A. An editor
B. A debugger
C. A console
Which one of the following is an example of a Python le extension?
A. pi
B. py
C. p
Which of the following enclose the input parameters or arguments of a function?
A. Brackets
B. Quotation marks
C. Curly braces
D. Parentheses
What is the expected output of the following code?
A. 1
B. Peter
C. None
D. value
E. The code is erroneous.
What is the expected output of the following code?
A. acdef
B. The code is erroneous.
C. abdef
D. abcef
What is the expected output of the following code?
A. 2
B. The code is erroneous.
C. 0
D. 1
What is the expected behavior of the following program?
A. The program will cause a ValueError exception and output a default error message.
B. The program will cause a SyntaxError exception.
C. The program will cause a ZeroDivisionError exception and output a default error message.
D. The program will cause a ValueError exception and output the following message: Too bad...
E. The program will raise an exception handled by the rst except block.
The part of your code where you think an exception may occur should be placed inside:
A. the except: branch
B. the exception: branch
C. the try: branch
How many stars (*) will the following code output to the screen?
A. one
B. six
C. two
D. three
What is the expected output of the following code? print(len([i for i in range(0, -2)]))
A. 1
B. 3
C. 2
D. 0