Correct Answer: Logical blocks share the same indentation.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Python Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Python MCQ Questions
How many positional arguments can be passed to the below function def my_func(*args): pass
Which statement would you use to import a module called 'foo'?
Read the following statements: >>> word = 'Help' + 'A' >>> word[:2] Which of the following will be the output of the above code?
Output of the following statements: >>> import string >>> s = 'little fox\011jumps over a lazy dog' >>> string.expandtabs(tabsize=1, s=s)
Read the following statements: Statement 1: The conditions used in 'while' and 'if' statements can contain only comparison operators. Statement 2: The operators 'is' and 'is not' compare whether two objects are really the same object. Which of the following is correct?
Output of following code? d = lambda p: p * 2 t = lambda p: p * 3 x = 2 x = d(x) x = t(x) x = d(x) print x
What is the method to retrieve the list of all active thread objects?
Output of following code? import threading k = 10 x = 0 m = threading.Lock() def foo(): global x for i in xrange(k): with m: x += 1 def bar(): global x for i in xrange(k): with m: x -= 1 t1 = threading.Thread(target=foo) t2 = threading.Thread(target=bar) t1.start() t2.start() t1.join() t2.join() print x
Which one is reentrant lock type?
Output of following code? def f2(n, result): if n == 0: return 0 else: return f2(n - 1, n + result) print(f2(2, 0))