This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 17 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 17 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. ..... are reserved words. A) Variables. B) Comments. C) Identifiers. D) Keywords. Show Answer Correct Answer: D) Keywords. 2. Which symbol stands for multiply? A) *. B) /. C) +. D) -. Show Answer Correct Answer: A) *. 3. To repeat until a particular condition is true use: A) While loop. B) For loop. C) If loop. D) Indentation. Show Answer Correct Answer: A) While loop. 4. What will the following code output? 'print("5 + 3 =", 5 + 3)' A) 5 + 3 = 8. B) 5 + 3 = 5 + 3. C) 5 + 3 = 53. D) Error. Show Answer Correct Answer: A) 5 + 3 = 8. 5. Which of the following is the correct syntax for a while loop in Python? A) 'while (condition) \{ \}'. B) 'while condition:'. C) 'while condition \{ \}'. D) 'while (condition):'. Show Answer Correct Answer: B) 'while condition:'. 6. The Raspberry Pi devices used in this course use which operating system (O/S)? A) Debian Linux. B) Windows 10. C) Apple iOS. D) Chrome. Show Answer Correct Answer: A) Debian Linux. 7. What will happen if you run this code print('red is my favourite colour") (a) A) A. SyntaxError. B) Get the result ''red is my favourite colour". C) All the above. D) None of the above. Show Answer Correct Answer: A) A. SyntaxError. 8. What is the result of the expression 'Hello' + ' World'? A) HelloWorld. B) Hello, World!. C) Hello World!. D) Hello World. Show Answer Correct Answer: A) HelloWorld. 9. Which statement correctly assigns the string "Tanner" to the variable name? A) Name = print( "Tanner"). B) Input("Tanner"). C) Name = "Tanner". D) Name = input("Tanner"). Show Answer Correct Answer: C) Name = "Tanner". 10. Which of the following is a valid integer in Python? A) 'hello'. B) 3.14. C) -1.5. D) 42. Show Answer Correct Answer: D) 42. 11. What is one reason for Python's huge community support? A) It is the only programming language used in data science. B) Python has no learning curve, making it hard for beginners. C) Its complexity makes it suitable for advanced programmers. D) Its simplicity and readability make it accessible to beginners. Show Answer Correct Answer: D) Its simplicity and readability make it accessible to beginners. 12. Which of the following is a key design feature of Python that enforces code structure? A) Use of semicolons (;) at the end of every line. B) Mandatory use of curly braces (\{\}) to define code blocks. C) Significant use of indentation (whitespace) to define code blocks. D) Requirement to explicitly declare the data type for every variable. Show Answer Correct Answer: C) Significant use of indentation (whitespace) to define code blocks. 13. What will be the result of the following import statement?from math import * A) Only the math module itself will be imported, but no functions or variables. B) A math module will be imported with the alias *. C) A specific subset of functions from the math module will be imported. D) All functions from the math module will be imported into the current namespace. Show Answer Correct Answer: D) All functions from the math module will be imported into the current namespace. 14. How do you add the value '9' to the end of a list called 'numbers'? A) Numbers.add(9). B) Numbers.append(9). C) Numbers.insert(9). D) Numbers.push(9). Show Answer Correct Answer: B) Numbers.append(9). 15. What does the 'append()' method do in a list? A) Removes an element from the list. B) Adds an element to the end of the list. C) Sorts the list. D) Clears the list. Show Answer Correct Answer: B) Adds an element to the end of the list. 16. What will be the output of the following code?total = 0for i in range(1, 4):total += iprint(total) A) 3. B) 6. C) 10. D) Error. Show Answer Correct Answer: B) 6. 17. Which Python keyword is used to handle an alternative condition that should be checked only if the initial if statement is false? A) Then. B) Else. C) Elif. D) Switch. Show Answer Correct Answer: C) Elif. 18. What is the correct way to output "Hello, World!" in Python? A) Echo 'Hello, World!'. B) Print('Hello World!'). C) Print('Hello, World!'). D) Console.log('Hello, World!'). Show Answer Correct Answer: C) Print('Hello, World!'). 19. What does a cross platform language mean? A) X=10x=x+10x=x-5print (x)x, y =x-2, 22print (x, y). B) 1513 22. C) 1512 24. D) 1512 22. Show Answer Correct Answer: B) 1513 22. 20. Apa tujuan dari pernyataan 'if' dalam Python? A) Pernyataan 'if' memungkinkan eksekusi kode secara kondisional berdasarkan ekspresi boolean. B) Pernyataan 'if' digunakan untuk mendefinisikan fungsi dalam Python. C) Pernyataan 'if' digunakan untuk mengimpor modul dalam Python. D) Pernyataan 'if' digunakan untuk membuat loop dalam Python. Show Answer Correct Answer: A) Pernyataan 'if' memungkinkan eksekusi kode secara kondisional berdasarkan ekspresi boolean. 21. What is the output of print(2 + 3)? A) 5. B) 23. C) 2+3. D) Error. Show Answer Correct Answer: A) 5. 22. What is the first step to save a Python program? A) Click on File tab. B) Select Save option. C) Give file name. D) Select destination folder. Show Answer Correct Answer: A) Click on File tab. 23. Full form of IDLE A) Integrated Development & Learning Environment. B) Integral Development Learning Environment. C) Invest Development Learning Language. D) Integrated Development Local Language. Show Answer Correct Answer: A) Integrated Development & Learning Environment. 24. Which subprogram is used to set the color of the pen in the turtle library? A) Pencolor(" ). B) Pensize(" ). C) Pendown(). D) Penup(). Show Answer Correct Answer: A) Pencolor(" ). 25. Which arithmetic operator is used to calculate the remainder (or modulus) after division? A) /. B) //. C) %. D) *. Show Answer Correct Answer: C) %. ← 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