Welcome to your Python Set 3 Read this before do Start Exam: 1- There are 25 Questions and complete it within 30 Minutes. 2- For Best Experience download our Android App from Google Play Store. परीक्षा शुरू करने से पहले इसे पढ़ें: 1- 25 प्रश्न हैं और इसे 30 मिनट के भीतर पूरा करें। 2- बेहतरीन अनुभव के लिए Google Play Store से हमारा Android ऐप डाउनलोड करें। Download App Now 1. Is Python code compiled or interpreted? Python code is only compiled Python code is both compiled and interpreted Python code is only interpreted Python code is neither compiled nor interpreted None 2. 30. What is the order of namespaces in which Python looks for an identifier? Python first searches the built-in namespace, then the local namespace and finally the global namespace Python first searches the local namespace, then the global namespace and finally the built-in namespace Python first searches the global namespace, then the local namespace and finally the built-in namespace Python first searches the built-in namespace, then the global namespace and finally the local namespace None 3. Which of the following character is used to give single-line comments in Python? ! /* # // None 4. Which of the following is used to define a block of code in Python language? Key Brackets Indentation All of the mentioned None 5. Which of the following is not a core data type in Python programming? Dictionary Lists Tuples Class None 6. "What will be the output of the following Python code? 1. class tester: 2. def __init__(self, id): 3. self.id = str(id) 4. id=""224"" 5. 6. >>>temp = tester(12) 7. >>>print(temp.id)" 12 21 22 32 None 7. What does pip stand for python? Pip Installs Packages Preferred Installer Program Pip Installs Python All of the mentioned None 8. Which of the following is the truncation division operator in Python? // / % | None 9. "The following python program can work with ____ parameters. def f(x): def f1(*args, **kwargs): print(""Sanfoundry"") return x(*args, **kwargs) return f1" 0 1 2 any number of None 10. Which of the following blocks will always be executed whether an exception is encountered or not in a program? except finally try None of These Hide None 11. "What will be the output of the following Python code snippet? for i in [1, 2, 3, 4][::-1]: print (i)" 1 2 3 4 3 2 1 4 2 4 3 1 4 3 2 1 None 12. " Which function is called when the following Python program is executed? f = foo() format(f)" format() __str__() __format__() str() None 13. Operators with the same precedence are evaluated in which manner? Right to Left Left to Right Only left Can’t say None 14. Which module in the python standard library parses options received from the command line? getopt os getarg main None 15. Which of the following functions converts date to corresponding time in Python? strftime() time strptime() Both B & C None 16. "What will be the output of the following Python code? l=[1, 0, 2, 0, 'hello', '', []] list(filter(bool, l))" [1, 2, ‘hello’] [1, 0, 2, ‘hello’, ”, []] [1, 0, 2, 0, ‘hello’, ”, []] Error None 17. " What will be the output of the following Python function? min(max(False,-3,-4), 2,7)" -4 -3 Both A & B FALSE None 18. "What will be the output of the following Python expression if x=56.236? print(""%.2f""%x)" 56.23 56.24 56.236 56 None 19. "What will be the output of the following Python statement? >>>""a""+""bc""" abc a bca bc None 20. "What will be the output of the following Python code? x = 'abcd' for i in x: print(i.upper())" "A B C D" a b c d "a B C D" None of these None 21. Who developed Python Programming Language? Rasmus Lerdorf Niene Stom Wick van Rossum Guido van Rossum None 22. " What will be the output of the following Python function? len([""hello"",2, 4, 6])" 1 3 4 7 None 23. Which of the following statements are used in Exception Handling in Python? except try finally All of the above None 24. Which type of Programming does Python support? functional programming object-oriented programming structured programming All of these None 25. "What will be the output of the following Python program?foo(x): x[0] = ['def'] x[1] = ['abc'] return id(x) q = ['abc', 'def'] print(id(q) == foo(q))" FALSE TRUE Both A & B None None Share this:TweetEmailTelegramPrintWhatsAppLike this:Like Loading... Related Posts (You May Also Read):