This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 74 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 74 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. A set of precise instructions that is meant to solve a problem is ..... A) A computer. B) An algorithm. C) A program. D) An interpreter. Show Answer Correct Answer: B) An algorithm. 2. What is the correct way to write a comment in Python? A) # This is a comment. B) // This is a comment. C) /* This is a comment */. D) None of the above. Show Answer Correct Answer: A) # This is a comment. 3. What is the purpose of adding Python to PATH? A) To increase execution speed. B) To run Python from the command prompt. C) To install additional libraries. D) To enable debugging. Show Answer Correct Answer: B) To run Python from the command prompt. 4. What data type is used to represent whole numbers(eg . 11, 213, ) in Python? A) Float. B) String. C) Int. D) Boolean. Show Answer Correct Answer: C) Int. 5. What will the following code print? "'pythonx = 7if x > 5:if x < 10:print("A") else:print("B")else:print("C") "' A) A. B) B. C) C. D) Nothing. Show Answer Correct Answer: A) A. 6. Output of print(7 % 21) is ..... A) None of the above. B) 7. C) Error. D) 3. Show Answer Correct Answer: B) 7. 7. What is the command to verify if Python is installed successfully on your system? A) Python start. B) Python run. C) Python version. D) Python check. Show Answer Correct Answer: C) Python version. 8. ..... keyword is used for creating a function in Python. A) Define. B) Fun. C) Def. D) Function. Show Answer Correct Answer: C) Def. 9. Which step comes first in the Data Science process? A) Model building. B) Data visualization. C) Data collection. D) Deployment. Show Answer Correct Answer: C) Data collection. 10. Which command is used to install Jupyter Notebook using pip? A) Install jupyter. B) Pip install jupyter. C) Jupyter install. D) Python install jupyter. Show Answer Correct Answer: B) Pip install jupyter. 11. What is the result of the following operation in Python? print(15 // 4) A) 3.75. B) 3. C) 4. D) 4.0. Show Answer Correct Answer: B) 3. 12. What is the significance of indentation in Python programming? A) Not required in Python. B) Used for decorative purposes. C) Optional for code execution. D) Very important for code readability. Show Answer Correct Answer: D) Very important for code readability. 13. What is the output of this code?def multiply (a, b = 2):return a * bprint (multiply (3, 4) ) A) 6. B) 8. C) 12. D) Error. Show Answer Correct Answer: C) 12. 14. What group of blocks controls movement of the Sprite? A) Control. B) Sensing. C) Motion. D) Look. Show Answer Correct Answer: C) Motion. 15. What is the purpose of the Python interpreter? A) Compile the code into binary format. B) Convert source code into machine-executable code line by line. C) Optimize the program for speed. D) Debug the source code. Show Answer Correct Answer: B) Convert source code into machine-executable code line by line. 16. Returning a range of characters (part of a string) is done using which syntax? A) Slice. B) Splice. C) Cut. D) Select. Show Answer Correct Answer: A) Slice. 17. What does the 'sorted()' function do in Python? A) Creates a new list. B) Reverses a list. C) Sorts a list. D) Removes duplicates from a list. Show Answer Correct Answer: C) Sorts a list. 18. What will the following code return? a='Hello World'print(a[0:8]) A) Hello Wor. B) Hello Worl. C) Hello W. D) Hello Wo. Show Answer Correct Answer: D) Hello Wo. 19. Which operator is used for floor division in Python? A) /. B) //. C) %. D) **. Show Answer Correct Answer: B) //. 20. Koje su glavne vrste podataka u Pythonu? A) String, broj, objekt. B) Float, string, niz. C) Boolean, karakter, niz. D) Int, float, str, bool. Show Answer Correct Answer: D) Int, float, str, bool. 21. What language does Tracy the turtle understand? A) Python. B) English. C) Spanish. D) Swahili. Show Answer Correct Answer: A) Python. 22. X, y=20, 60y, x, y=x, y-10, x+10print (x, y) A) 30 50. B) 50 20. C) 60 10. D) 50 30. Show Answer Correct Answer: D) 50 30. 23. What is the extension of a Python file? A) .python. B) .py. C) .pyt. D) .pyth. Show Answer Correct Answer: B) .py. 24. What is the correct way to write an if-else statement in one line? A) If x > y print("Yes") else print("No"). B) Print("Yes") if x > y else print("No"). C) Print("Yes" if x > y else "No"). D) Both B and C. Show Answer Correct Answer: D) Both B and C. 25. Convert the decimal number (345)10 to Octal: A) 331. B) 431. C) 531. D) 631. Show Answer Correct Answer: C) 531. ← 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