This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 56 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 56 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Operator "%" dalam Python digunakan untuk operasi ..... A) Pemangkatan. B) Modulus (sisa bagi). C) Perbandingan. D) Logika. Show Answer Correct Answer: B) Modulus (sisa bagi). 2. Which symbol is used to write a comment in Python? A) **. B) //. C) ?. D) #. Show Answer Correct Answer: D) #. 3. Which of the following loop types is primarily used when the number of iterations is known beforehand? A) For. B) While. C) Do-while. D) Repeat-until. Show Answer Correct Answer: A) For. 4. What is computer programming? A) Process of writing set of instructions to solve the real life problem. B) A type of software. C) A hardware component. D) A programming language. Show Answer Correct Answer: A) Process of writing set of instructions to solve the real life problem. 5. Which operator performs floor division in Python? A) /. B) //. C) %. D) **. Show Answer Correct Answer: B) //. 6. What is a script library? A) A website for coding ideas. B) Pre-written code imported to save time. C) A type of hardware. D) Software that decomposes your scripts. Show Answer Correct Answer: B) Pre-written code imported to save time. 7. Password= input("Enter the password")What is the name of this variable? A) Passback. B) Password. C) Post. D) Pen. Show Answer Correct Answer: B) Password. 8. Given the tuple nums = (4, 9, 2, 9), what does len(nums) return? A) It returns 5 elements. B) It returns 4 elements. C) It returns 2 elements. D) It returns 3 elements. Show Answer Correct Answer: B) It returns 4 elements. 9. What is the purpose of variables in programming? A) To display messages. B) To translate programming languages. C) To execute instructions. D) To keep track of values. Show Answer Correct Answer: D) To keep track of values. 10. Contents from beautifulsoup are usually returned as A) Objects. B) Variables. C) Lists. D) Tuples. Show Answer Correct Answer: A) Objects. 11. What will be the output of the following code? "'pythonprint(2 + 3 * 4) "' A) 20. B) 14. C) 24. D) 18. Show Answer Correct Answer: B) 14. 12. How can you import a module in Python? Give an example. A) Require('math'). B) From math import *. C) Import math(). D) Import math. Show Answer Correct Answer: D) Import math. 13. What is the main advantage of using Python for beginners? A) It is clear and easy to read. B) It is the fastest language. C) It requires a lot of setup. D) It has a complex syntax. Show Answer Correct Answer: A) It is clear and easy to read. 14. What is the correct command to install the "requests" library using pip in the terminal? A) Python-m pip install requests. B) Pip install requests. C) Python install requests. D) Python-m install requests. Show Answer Correct Answer: B) Pip install requests. 15. What is the purpose of the input command? A) To wait for user input. B) To print output. C) To save a file. D) To run a program. Show Answer Correct Answer: A) To wait for user input. 16. In which year was Python first released? A) 1989. B) 1991. C) 1995. D) 2000. Show Answer Correct Answer: B) 1991. 17. What is the return type of function id()? A) Float. B) String. C) Int. D) None of the above. Show Answer Correct Answer: C) Int. 18. What is the purpose of the Python Turtle module? A) To manage databases efficiently. B) The purpose of the Python Turtle module is to facilitate learning programming through visual graphics and drawing. C) To create complex web applications. D) To perform advanced mathematical calculations. Show Answer Correct Answer: B) The purpose of the Python Turtle module is to facilitate learning programming through visual graphics and drawing. 19. Choose the correct operators used in python:divide, multiply, add, subtract A) /, *, +, -. B) Div, mul, +, -. C) \, x, +, -. D) ~, *, +, -. Show Answer Correct Answer: A) /, *, +, -. 20. When did its development begin? A) 2000. B) 1990. C) 1989. D) 1998. Show Answer Correct Answer: C) 1989. 21. Y = 4z = lambda x:x ** yprint z(3) A) 81. B) 12. C) 64. D) None of the above. Show Answer Correct Answer: A) 81. 22. What does a function do? A) Stores data. B) Repeats actions. C) Performs a task. D) Saves files. Show Answer Correct Answer: C) Performs a task. 23. What is the purpose of the 'def' keyword? A) To declare a variable in Python. B) To define a function in Python. C) To create a class in Python. D) To import a module in Python. Show Answer Correct Answer: B) To define a function in Python. 24. What will the following code output if the input is 13?lucky = 13print("Guess my number:")guess = int(input())if guess == lucky:print("Amazing, you guessed it")else:print("Sorry, it's not", guess) A) "Amazing, you guessed it". B) "Sorry, it's not 13". C) "My lucky number is 13". D) No output. Show Answer Correct Answer: A) "Amazing, you guessed it". 25. Out of addition(+) and Subtraction (-) operator, which has more precedence? A) Subtraction (-). B) Addition (+). C) None of the above. D) Both have same precedence. Show Answer Correct Answer: D) Both have same precedence. ← 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