This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 28 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 28 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is Python named after? A) A really big tropical snake. B) Monty Python & the Flying Circus. C) Fred Python, the creator. D) An event where people eat lots of pies. Show Answer Correct Answer: B) Monty Python & the Flying Circus. 2. Identifier name can be of maximum ..... character A) 79. B) Any number of. C) 63. D) 53. Show Answer Correct Answer: C) 63. 3. How do you concatenate the strings '"Good"' and '"afternoon"' in Python? A) "Good" + "afternoon". B) "Good" & "afternoon". C) "Good" .concat("afternoon"). D) "Good" . "afternoon". Show Answer Correct Answer: A) "Good" + "afternoon". 4. Which value is a String? A) 64. B) "cat". C) True. D) 0.5. Show Answer Correct Answer: B) "cat". 5. Keyword apa yang digunakan untuk mendefinisikan sebuah fungsi di Python? A) Metode. B) Definisi. C) Fungsi. D) Def. Show Answer Correct Answer: D) Def. 6. The List Data Type, Working with Lists, and Augmented Assignment Operators are covered in which module? A) Module-1. B) Module-2. C) Module-3. D) Module-4. Show Answer Correct Answer: B) Module-2. 7. Which if the following is a disadvantage of Python? A) Compulsory variable declaration before using them. B) Python is not easy to understand. C) Python is slower than compiled programs in cases of large-scale simulations. D) Python is an open-source programming language. Show Answer Correct Answer: C) Python is slower than compiled programs in cases of large-scale simulations. 8. Manakah di antara berikut ini yang merupakan nama variabel yang valid di Python? A) 123variable. B) Valid variable name. C) Variable-name!. D) Invalid-variable-name. Show Answer Correct Answer: B) Valid variable name. 9. What will be the output of the following lambda function?add = lambda a, b:a + bprint (add (3, 4) ) A) 7. B) 34. C) A + b. D) Error. Show Answer Correct Answer: A) 7. 10. How do you define a floating point number in Python? A) A floating point number can only be defined using binary format. B) A floating point number in Python is defined by including a decimal point (e.g., 3.14) or using scientific notation (e.g., 2.5e2). C) A floating point number is created by adding a percentage sign after the number. D) A floating point number is defined by using only whole numbers. Show Answer Correct Answer: B) A floating point number in Python is defined by including a decimal point (e.g., 3.14) or using scientific notation (e.g., 2.5e2). 11. Which of the following is not a valid way to define this dictionary in Python: A) D = dict([ ('foo', 100), ('bar', 200), ('baz', 300)]). B) D = \{\}d['foo'] = 100d['bar'] = 200d['baz'] = 300. C) D = dict(foo=100, bar=200, baz=300). D) D = \{'foo':100, 'bar':200, 'baz':300\}. E) D = \{ ('foo', 100), ('bar', 200), ('baz', 300) \}. Show Answer Correct Answer: E) D = \{ ('foo', 100), ('bar', 200), ('baz', 300) \}. 12. The two major versions of Python are: A) Python 1.x and Python 2.x. B) Python 2.x and Python 3.x. C) Python 3.x and Python 4.x. D) Python 1.x and Python 3.x. Show Answer Correct Answer: B) Python 2.x and Python 3.x. 13. What is the output of the following code? "'pythonx = "Python"y = "Programming"print(x + '' '' + y) "' A) Python Programming. B) PythonProgramming. C) Python. D) Programming. Show Answer Correct Answer: A) Python Programming. 14. A ..... tool creates exact copies of your files to be restored later in case of data loss. A) Backup tool. B) History tool. C) All the above. D) None of the above. Show Answer Correct Answer: A) Backup tool. 15. Stores a piece of data, and gives it a specific name A) Variable. B) Whitespace. C) Interpreter. D) Modulus. Show Answer Correct Answer: A) Variable. 16. Which of the following is not a feature of Python language? A) Python is not case-sensitive. B) Python is a proprietary software. C) Python uses indentation for blocks. D) Python supports multiple programming paradigms. Show Answer Correct Answer: B) Python is a proprietary software. 17. What is the correct syntax for an if statement in Python? A) If x > 5 then:. B) If (x > 5). C) If x > 5:. D) If x > 5 \{\}. Show Answer Correct Answer: C) If x > 5:. 18. How do you declare a variable in Python? A) Var variable name = value. B) Variable name:value. C) You declare a variable in Python by using the syntax:variable name = value. D) Let variable name = value. Show Answer Correct Answer: C) You declare a variable in Python by using the syntax:variable name = value. 19. What is a notable characteristic of Python code? A) It is difficult to debug. B) It is easy to read. C) It requires extensive comments. D) It is only used for web development. Show Answer Correct Answer: B) It is easy to read. 20. What will be the output of print(type(12.0)) in Python? A) Bool. B) Int. C) Float. D) String. Show Answer Correct Answer: C) Float. 21. Bagaimana cara membuat variabel dalam Python? A) Menggunakan kata kunci var, misalnya var nama = "Budi". B) Menggunakan tanda sama dengan (=), misalnya nama = "Budi". C) Menggunakan tanda titik dua (:), misalnya nama: "Budi". D) Menggunakan tanda tanya (?), misalnya nama? "Budi". Show Answer Correct Answer: B) Menggunakan tanda sama dengan (=), misalnya nama = "Budi". 22. What is the output of:print(3 * 'A')? A) AAA. B) A3. C) Error. D) 3A. Show Answer Correct Answer: A) AAA. 23. ..... method is used to find the data type of a variable. A) Type(). B) Dtype(). C) Typed(). D) None of the above. Show Answer Correct Answer: A) Type(). 24. False is an example of what data type? A) String. B) Float. C) Boolean. D) None of the above. Show Answer Correct Answer: C) Boolean. 25. Which of the following can not be used as an identifier? A) All of the above. B) Max. C) Eval. D) Pass. Show Answer Correct Answer: D) Pass. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books