This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 82 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 82 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is an example of Python's use in Artificial Intelligence (AI)? A) Creating smart programs and simple games. B) Writing novels. C) Building physical machines. D) Painting pictures. Show Answer Correct Answer: A) Creating smart programs and simple games. 2. Start with items = ("pen", "book"). To add "eraser" using tuple concatenation, which code is correct? A) Items.append("eraser") mutates tuple. B) Items += ("eraser", ) concatenates. C) Items = items + ["eraser"] mixes types. D) Items.insert(1, "eraser") modifies. Show Answer Correct Answer: B) Items += ("eraser", ) concatenates. 3. Which subprogram is used to remove certain characters when reading from and writing to files in Python? A) Append(). B) Strip(). C) Split(). D) Join(). Show Answer Correct Answer: B) Strip(). 4. What will be the output after the following statements?x = 8 y = 2 print(x // y) A) 4.0. B) 4. C) 16. D) 16.0. Show Answer Correct Answer: B) 4. 5. Which of the following data types can store decimal numbers? A) Complex. B) Str. C) Float. D) Int. Show Answer Correct Answer: C) Float. 6. How do you install a package in Python using pip? A) Pip get package name. B) Pip add package name. C) Pip fetch package name. D) Pip install package name. Show Answer Correct Answer: D) Pip install package name. 7. How do you convert a string "123" to an integer in Python? A) Int("123"). B) String("123"). C) Str("123"). D) Float("123"). Show Answer Correct Answer: A) Int("123"). 8. What is the purpose of the 'return' statement? A) The purpose of the 'return' statement is to exit a function and provide a value to the function caller. B) The 'return' statement is used to define a function's parameters. C) The 'return' statement is for printing output to the console. D) The 'return' statement allows for looping through a function. Show Answer Correct Answer: A) The purpose of the 'return' statement is to exit a function and provide a value to the function caller. 9. When naming a variable what must be taking into consideration? A) Name must not include spaces. B) Use uppercase. C) Use lowercase. D) Nothing. Show Answer Correct Answer: C) Use lowercase. 10. To make decisions in our code we can use which statement A) If. B) Input. C) Print. D) Str. Show Answer Correct Answer: A) If. 11. Which of the following is a lambda function in Python? A) A named function. B) A function that takes no arguments. C) A recursive function. D) An anonymous function. Show Answer Correct Answer: D) An anonymous function. 12. What command can you use to check if Python is installed? A) Python check. B) Py info. C) Python version check. D) Python version or python3 version. Show Answer Correct Answer: D) Python version or python3 version. 13. How did Python, the programming language, get its name? A) Guido van Rossum name it to honor Monty Python's Flying Circus, a BBC comedy series popular in the 1970s. B) Guido van Rossum name it after the Pythonidae-a family of large, nonvenomous snakes. C) Guido van Rossum name it to honor Python of Catana, a dramatic poet of the time of Alexander the Great. D) None of the above. Show Answer Correct Answer: A) Guido van Rossum name it to honor Monty Python's Flying Circus, a BBC comedy series popular in the 1970s. 14. How to create a dictionary? A) Dict = []. B) Dict = (). C) Dict = \{key:values\}. D) None of the above. Show Answer Correct Answer: C) Dict = \{key:values\}. 15. Which symbol is used in variable length arguments to specify more arguments than specified? A) #. B) *. C) &. D) %. Show Answer Correct Answer: B) *. 16. Why is the space important in "in '' when concatenating? A) It makes the code run faster. B) It stops words from joining together in the output. C) It turns the variable into an integer. D) It changes the identifier. Show Answer Correct Answer: B) It stops words from joining together in the output. 17. Which of the following is a valid print statement in Python? A) Print("Let's learn Python!"). B) Print('Python is fun!"). C) Print(Hello, Python!). D) Print('Python is fun!'). Show Answer Correct Answer: A) Print("Let's learn Python!"). 18. Which of the following statements about Python is true? A) Python is only used for web development. B) Python requires a specific hardware architecture to run. C) Python is an interpreted, high-level programming language. D) Python is a compiled, low-level programming language. Show Answer Correct Answer: C) Python is an interpreted, high-level programming language. 19. Which of the following will correctly take a user's input and store it in a variable called name? A) Name = input("Enter your name: "). B) Name = input("Enter your name"). C) Input("Enter your name: ") = name. D) Input(name = "Enter your name: "). Show Answer Correct Answer: A) Name = input("Enter your name: "). 20. A while loop while run as long as its condition is A) False. B) Greater than 0. C) True. D) Executed. Show Answer Correct Answer: C) True. 21. Which one of these is another programming language? A) Lego. B) Pogo. C) Logo. D) Icon. Show Answer Correct Answer: C) Logo. 22. Which of these is used to join two strings? A) ,. B) +. C) *. D) &. Show Answer Correct Answer: B) +. 23. Which of the following is not a type of argument? A) Positional Argument. B) Keyword Argument. C) Default Argument. D) Static Argument. Show Answer Correct Answer: D) Static Argument. 24. Reserved word or "name" that identifies built-in operations, functions, I/O operations, or conditionals that may not be used to name variables, functions, or any other type of identifier. A) Don't use names. B) Keyword. C) Variable. D) Identifiers. Show Answer Correct Answer: B) Keyword. 25. What will be the output of range(5)? A) 1 to 5. B) 0 to 5. C) 0 to 4. D) 1 to 4. Show Answer Correct Answer: C) 0 to 4. ← 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