This question is based on the graphic shown below.
What will be the output of the given Python code?
Hi
Hello
Correct Answer:
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
Output of the following Python code? class Son(object): def __init__(self, n): self.n = n def gN(self): return self.n def sE(self): return False class Ploy(Son): def __init__(self, n, eid): super(Ploy, self).__init__(n) self.empID = eid def sE(self): return True def gID(self): return self.empID emp = Ploy("1", "0") print(emp.gN(), emp.sE(), emp.gID())
Output of the following Python code? def ps(a,b): s = a + b return (s, a) s, a = ps(0,4) a=a+4 s1 = 1 i = 1 while i <= a: s1 = s1 + i i = i+1 print(s1)
Output of the following Python code. import collections c1 = { 'a' : 1, 'b' : 2 } c2 = { 'b' : 3, 'c' : 4 } c3 = { 'f' : 5 } ch = collections.ChainMap(c1, c2) #print (ch.maps) ch1 = ch.new_child(c3) #print (ch1.maps) print (ch1['b']) ch1.maps = reversed(ch1.maps) print (ch1['b'])
Output of the following Python code? print (5/2) print (-5/2) print (5.0/2) print (-5.0/2)
This question is based on the graphic shown below. Which option will be the correct output of the given Python code?
After you enter the following in a Python script and run the script, what would get printed? formatter = '%s' print formatter % (formatter)
What is a persistent dictionary?
What gets printed: a = [0] b = [a] *4 a[0] = 2 print(b)
When opening a file, what is the difference between text mode and binary mode?
What is a list comprehension?