What is the expected behavior of the following code?
x - 3 % 1
y -1 if x > else 0
print (y)
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
What is the expected output of the following code?
What is the expected output of the following snippet?
The following class hierarchy is given. What is the expected output of the code?
A file name like this one below says mat: (select three answers)
services. cpython-36.pyc
Which of the following statement are true? (Select two answers)
Which one of the platform module functions should be used to determine the underlying platform name?
What is the expected output of the following code?
Is it possible to safely check if a class/object has a certain attribute?
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)
string = 'SKY' (:: -1)
string = string (-1)
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)
What is true about Object-Oriented Programming in Python? (Select two answers)
What will be the value of the i variable when the while e loop finishes its execution?
You are going to read just one character from a stream called s. Which statement would you use?
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)
Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)
Expected output:
1 2 3
Code:
Which of the following expressions evaluate to True? (Select two answers)
What is the expected output of the following snippet?
Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)
import random
v1 = random. random()
v2 = random. random()
Which of the following literals reflect the value given as 34.23? (select two answers)
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write: