Correct Answer: '234'
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
What type of error does 'type('1') is int' return?
Given the list called my_list, what would the following slice notation give you: my_list[-1:-5:-1]
Is it possible to link a Python program to code written in C?
How can one merge two dicts? >>> x = {'a':1, 'b': 2} >>> y = {'b':10, 'c': 11} result: {'a': 1, 'b': 10, 'c': 11}
a = range(1, 10) m = map(lambda x: x % 2 == 0, a) What is the value of m
This question is based on the graphic shown below. What will be the correct output of the given Python 3.4.2 code?
Which databas can be used with Python? 1. MySQL 2. Oracle 3. Maria DB 4. Microsoft SQL Server
In Python, while developing a program, if you know the place where the code is to be written, but at a later stages, then which control statements will you use?
Correct answer from the given options. import multiprocessing def enr(conn, msgs): for msg in msgs: conn.send(msg) print('{}'.format(msg)) conn.close() def cer(conn): while 1: msg = conn.recv() if msg == 'Hi': break print('{}'.format(msg)) if __name__ == '__main__': msgs = ['hello', 'hey', 'hru?', 'Hi'] parent_conn, child_conn = multiprocessing.Pipe() p1 = multiprocessing.Process(target=enr, args=(parent_conn,msgs)) p2 = multiprocessing.Process(target=cer, args=(child_conn,)) p1.start() p2.start() p1.join() p2.join()
Output of the following Python language code? import multiprocessing result = [] def s_p(mp): global result for num in mp: result.append(num * num+1) print('{}'.format(result)) if __name__ == '__main__': mp = [1,2,3,4] p1 = multiprocessing.Process(target=s_p, args=(mp,)) p1.start() p1.join() print('{}'.format(result))