Welcome to your Python Set 5 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. What is the output of print 0.1 + 0.2 == 0.3? TRUE FALSE None 2. Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)? 0 1 2 3 None 3. Suppose list1 is [3, 5, 25, 11, 13], what is min(list1)? 0 3 5 11 None 4. What is the output of this expression, 3*1**3? 0 3 9 18 None 5. Which of the following is the correct extension of the Python file? .p .py .pt 2 None 6. Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]? [2, 33, 222, 14] [25, 14, 222, 33, 2] Both A & B 25 None 7. Which of the following is used to define a block of code in Python language? Key Brackets A or B Indentation None 8. Which of the following is the use of id() function in python? Id returns the identity of the object float Every object doesn’t have a unique id All of the above None 9. Which one of these is floor division? // / Both A & B % None 10. Is Python code compiled or interpreted? Python code is neither compiled nor interpreted Python code is only compiled Python code is only interpreted Python code is both compiled and interpreted None 11. Which of the following commands will create a list? list1 = [] list1 = list([1, 2, 3]) list1 = list() All of the above None 12. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation? print(list1[:-2]) print(list1[2:]) print(list1[:2]) all of the mentioned None 13. To shuffle the list(say list1) what function do we use? random random.shuffleList(list1) shuffle(list1) random.shuffle(list1) None 14. To remove string “hello” from list1, we use which command? list1.remove(“hello”) list1.remove(helo) list.remove(hello) list removeOne(“hello”) None 15. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)? 2 3 4 5 None 16. To insert 5 to the third position in list1, we use which command? list1.insert(2, 5) list1.append(3, 5) list1.insert(3, 5) list1.add(3, 5) None 17. What is the output when we execute list(“hello”)? [‘hello’] [‘holle’] [‘h’, ‘e’, ‘l’, ‘l’, ‘o’] [‘helo’] None 18. Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]? 0 2 25 None of these None 19. Suppose list1 is [2445,133,12454,123], what is max(list1)? 123 133 2445 12454 None 20. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()? [3, 1, 25, 5, 20, 5, 4] [3, 4, 5, 5, 25, 1, 3] [3, 1, 25, 5, 20, 5, 4, 3] None of these None 21. Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is: [0, 1, 2, 3, 5] [0, 1, 2, 4] [0.0, 0.5, 1.0,] None of the above None 22. Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)? [1, 3, 3, 4, 5, 5, 20, 25] [1, 3, 4, 5, 20, 25] [3, 4, 5, 20, 25, 1, 3] [3, 5, 20, 5, 25, 1, 3] None 23. Suppose list1 is [4, 7, 9], what is sum(list1)? 20 37 67 43 None 24. Suppose list1 is [1, 3, 2], What is list1 * 2? [1, 3, 2, 1, 3, 2, 1, 3, 2,] [1, 3, 2, 1, 3, 2] [1, 2, 3, 1, 2, 3,] 12 None 25. Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)? 5 4 3 None of the above None Share this:TweetEmailTelegramPrintWhatsAppLike this:Like Loading... Related Posts (You May Also Read):