This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 29 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 29 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which statement is used to skip the current iteration and move to the next one? A) Continue. B) Pass. C) Break. D) Skip. Show Answer Correct Answer: A) Continue. 2. What is the main objective of the Python programming class? A) To learn advanced Python libraries. B) To write small programs in Python. C) To understand the history of Python. D) To create a web application. Show Answer Correct Answer: B) To write small programs in Python. 3. What is a correct syntax to output "Hello World" in Python? A) Echo("Hello World"). B) Echo "Hello World". C) Print("Hello World"). D) PRINT("Hello World"). Show Answer Correct Answer: C) Print("Hello World"). 4. Which of these stores a piece of data, and gives it a specific name? A) Variable. B) Whitespace. C) Interpreter. D) Modulo. Show Answer Correct Answer: A) Variable. 5. What does the Python 'print()' function automatically add to ensure that console output appears on separate lines? A) Carriage return and line feed. B) Brackets. C) Commas. D) Semicolons. Show Answer Correct Answer: A) Carriage return and line feed. 6. Which job might involve using Python to build robots? A) Teacher. B) Robotics engineer. C) Doctor. D) Baker. Show Answer Correct Answer: B) Robotics engineer. 7. What data type is "67" ? A) String. B) Int. C) Float. D) Boolean. Show Answer Correct Answer: A) String. 8. Python is a popular programming language used for ..... A) Cooking. B) Web development. C) Painting. D) Gardening. Show Answer Correct Answer: B) Web development. 9. Which symbol is the assignment operator in Python? A) +. B) ==. C) =. D) !=. Show Answer Correct Answer: C) =. 10. How do you define a list in Python? A) A list in Python is defined using angle brackets, e.g., my list = <1, 2, 3>. B) A list in Python is defined using parentheses, e.g., my list = (1, 2, 3). C) A list in Python is defined using square brackets, e.g., my list = [1, 2, 3]. D) A list in Python is defined using curly braces, e.g., my list = \{1, 2, 3\}. Show Answer Correct Answer: C) A list in Python is defined using square brackets, e.g., my list = [1, 2, 3]. 11. If else statement A) Outputs a message on the screen. B) Gets data from the user. C) A decision. D) A loop controlled by a decision. Show Answer Correct Answer: C) A decision. 12. Which function is used to read a CSV file into a Pandas DataFrame? A) Pd.load csv(). B) Pd.read csv(). C) Pd.csv(). D) Pd.open csv(). Show Answer Correct Answer: B) Pd.read csv(). 13. In the expression a + b, what are a and b called? A) Operators. B) Operands. C) Expressions. D) Literals. Show Answer Correct Answer: B) Operands. 14. Which keyword is used to define a function? A) Func. B) Def. C) Define. D) Function. Show Answer Correct Answer: B) Def. 15. What is the official website to download Python? A) Https://www.py.org/download/. B) Https://www.python.org/downloads/. C) Https://www.downloadpython.org/. D) Https://www.python.com/downloads/. Show Answer Correct Answer: B) Https://www.python.org/downloads/. 16. Is python an interpreted language? A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 17. Which of the following is a valid comment in Python? A) '// This is a comment'. B) '/* This is a comment */'. C) '# This is a comment'. D) ". Show Answer Correct Answer: C) '# This is a comment'. 18. Which of these is a Python list method? A) Push(). B) Append(). C) InsertAt(). D) Add(). Show Answer Correct Answer: B) Append(). 19. Which of the following is an invalid variable? A) My string 1. B) 1st string. C) Foo. D) . Show Answer Correct Answer: B) 1st string. 20. How many times will the following loop execute?for i in range(5):print(i) A) 4. B) 5. C) 6. D) Infinite. Show Answer Correct Answer: B) 5. 21. Your program asks people how much money something costs and saves it as a variable named "price" . Assuming users enter the amount correctly, which command will result in the value containing dollars BUT NO cents. A) Cost = float(price). B) Cost = price. C) Cost = int(price). D) Cost = str(price). Show Answer Correct Answer: C) Cost = int(price). 22. Which of the following is used to create a list in Python? A) Parentheses (). B) Square brackets []. C) Curly braces \{\}. D) Angle brackets <>. Show Answer Correct Answer: B) Square brackets []. 23. What will the following code output if diceroll equals 4?from random import randintdiceroll = 4if diceroll > 3:print(diceroll, "is a large roll")else:print(diceroll, "is a small roll") A) "4 is a large roll". B) "4 is a small roll". C) No output. D) "Yet you rolled a 4". Show Answer Correct Answer: A) "4 is a large roll". 24. What is the correct function to display output to the console in Python? A) Echo( ). B) Display( ). C) Write( ). D) Print( ). Show Answer Correct Answer: D) Print( ). 25. Identify the keyword that accesses an instance's attributes when three objects are created. A) Inheritance. B) Class. C) Init . D) Self. Show Answer Correct Answer: C) Init . ← 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