Loading questions...
Updated
Want a break from the ads?
Become a Supporter and enjoy a completely ad-free experience, plus unlock Learn Mode, Exam Mode, AstroTutor AI, and more.
Can a module run like regular code?
What is the expected output of the following snippet?

A variable stored separately in every object is called:
The simplest possible class definition in Python can be expressed as:
Python's built in function named open () tries to open a file and returns:
Is it possible to safely check if a class/object has a certain attribute?
The first parameter of each method:
How many elements will the list1 list contain after execution of the following snippet?

How many lines does the following snippet output?

Files with the suffix .pyc contain:
What will the value of the i variable be when the following loop finishes its execution?

A method for passing the arguments used by the following snippet is called:

What is the expected output of the following code?

What is the expected behavior of the following code?

It will:
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?

Assuming that String is six or more letters long, the following slice

is shorter than the original string by:
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V OPER 1 -
What is the expected output of the following snippet?

A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
What is the expected output of the following snippet?

What is the expected output of the following snippet?

The following class hierarchy is given. What is the expected out of the code?

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
What is the expected behavior of the following snippet?

It will:
How many elements will the list2 list contain after execution of the following snippet?
