This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 65 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 65 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Variabel dalam Python digunakan untuk ..... A) Menghapus data. B) Menyimpan nilai dengan nama simbolis. C) Menampilkan teks ke layar. D) Menentukan warna tampilan yang sangat menarik untuk user dapat digunakan. Show Answer Correct Answer: B) Menyimpan nilai dengan nama simbolis. 2. What is the main purpose of comments in Python? A) To increase the runtime performance of the program. B) To provide clarity and context to the code. C) To replace the need for documentation. D) To execute code more efficiently. Show Answer Correct Answer: B) To provide clarity and context to the code. 3. The suitable data type to store the value 9.76 A) Integer. B) Float. C) Boolean. D) String. Show Answer Correct Answer: B) Float. 4. What is the output of the following code?food = "burgers"number = 6print(number + food) A) 6 burgers. B) 6 "burgers". C) 6burgers. D) It will produce an error. Show Answer Correct Answer: D) It will produce an error. 5. Which of the following is a correct Python command to print 'hello world'? A) Echo 'hello world'. B) System.out.println('hello world'). C) Print('hello world'). D) Printf('hello world'). Show Answer Correct Answer: C) Print('hello world'). 6. Given t = (4, 1, 3, 2), which statement creates a list sorted ascending without changing t? A) Sorted(t) returns [1, 2, 3, 4]. B) T.sort() returns [1, 2, 3, 4]. C) List(t).sort() returns [1, 2, 3, 4]. D) Tuple(sorted(t)) returns [1, 2, 3, 4]. Show Answer Correct Answer: A) Sorted(t) returns [1, 2, 3, 4]. 7. The value that represents the absence of any value in Python is: A) None. B) Nothing. C) Not. D) Nein. Show Answer Correct Answer: A) None. 8. Which of the following is a binary number? A) 10001011. B) 12378611. C) 3.14. D) None of the above. Show Answer Correct Answer: A) 10001011. 9. How do you write a comment in Python so that the text is ignored by the computer? A) // This is a comment. B) . C) # This is a comment. D) /* This is a comment */. Show Answer Correct Answer: C) # This is a comment. 10. What is one way Python is used in video games? A) Programming game characters. B) Drawing game art. C) Writing the music. D) Designing game boxes. Show Answer Correct Answer: A) Programming game characters. 11. This data type is used to store a mixture of letters and numbers and symbols. A) String. B) Character. C) Boolean. D) Integer. Show Answer Correct Answer: A) String. 12. What is the answer to print (12/6)? A) 1. B) 2. C) 6. D) 10. Show Answer Correct Answer: B) 2. 13. Which of the following statements will cause a syntax error in Python? A) Print("Hello"). B) Print("Hello'. C) Print('Hello'). D) Print("Hello World"). Show Answer Correct Answer: B) Print("Hello'. 14. Which brackets are used to define a list in Python? A) \{\}. B) []. C) <>. D) (). Show Answer Correct Answer: B) []. 15. Tipe data apa yang digunakan untuk menyimpan teks dalam Python? A) Int. B) Float. C) Str. D) Bool. Show Answer Correct Answer: C) Str. 16. In which year was the Python language developed? A) 1995. B) 1972. C) 1981. D) 1989. Show Answer Correct Answer: D) 1989. 17. What will the following code output? "'pythonprint("The temperature is", 18, "degrees Celsius") "' A) The temperature is 18 degrees Celsius. B) The temperature is18degrees Celsius. C) The temperature is, 18, degrees Celsius. D) The temperature is 18. Show Answer Correct Answer: A) The temperature is 18 degrees Celsius. 18. Which of the following is used to create a dictionary in Python? A) \{\}. B) []. C) (). D) ||. Show Answer Correct Answer: A) \{\}. 19. Which comparison operator checks if 2 values are "less or equal" than another value? A) <. B) !=. C) <=. D) >=. Show Answer Correct Answer: C) <=. 20. Which of the following is not a valid data type in Python? a) Integer b) Float c) String d) Character A) D. B) C) String. C) B) Float. D) A) Integer. Show Answer Correct Answer: A) D. 21. You need to modify the example program so it reports whether the first number is greater than or equal to the second number. Which operator should replace the current greater-than operator (>) in the print statement to achieve this? A) >=. B) <=. C) ==. D) <. Show Answer Correct Answer: A) >=. 22. COMMENTS BEGIN WITH ..... SYMBOL . A) #. B) @. C) %. D) None of the above. Show Answer Correct Answer: A) #. 23. Which one is a Python data type? A) Picture. B) Number. C) Happy. D) Snack. Show Answer Correct Answer: B) Number. 24. What is the main purpose of the Tkinter library in Python? A) Machine learning. B) Creating graphical user interfaces. C) Web development. D) Data analysis. Show Answer Correct Answer: B) Creating graphical user interfaces. 25. What does int() represent? A) Internet. B) Integer. C) Intel. D) Input. Show Answer Correct Answer: B) Integer. ← 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