This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 6 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. How do you create a table in SQL? A) CREATE TABLE. B) NEW TABLE. C) ADD TABLE. D) MAKE TABLE. Show Answer Correct Answer: A) CREATE TABLE. 2. Which of the following is the correct way to check if a number is NOT equal to 10 in Python? A) If num != 10:. B) If num <> 10:. C) If num =! 10:. D) If num not 10:. Show Answer Correct Answer: A) If num != 10:. 3. Aturan penamaan variabel Python yang benar adalah ..... A) Boleh diawali dengan angka. B) Tidak boleh mengandung garis bawah. C) Case-insensitive. D) Karakter pertama harus huruf atau garis bawah. Show Answer Correct Answer: D) Karakter pertama harus huruf atau garis bawah. 4. In which year Python is created? A) 1990. B) 1991. C) 1992. D) 1993. Show Answer Correct Answer: B) 1991. 5. What will the following code print? print('Name:', name) A) Name:Abhishek. B) Name:. C) Abhishek. D) None of the above. Show Answer Correct Answer: A) Name:Abhishek. 6. What is the correct code to print 'Hello World' in Python? A) Echo 'Hello World'. B) Print('Hello World'). C) Printf('Hello World'). D) System.out.println('Hello World'). Show Answer Correct Answer: B) Print('Hello World'). 7. What would be the output of the following code snippet?a ..... dict = \{'color':'blue', 'fruit':'apple', 'pet':'dog'\}for key in a ..... dict:print(key) A) 'blue" apple" dog'. B) Colorfruitpet. C) Blueappledog. D) 'color" fruit" pet'. Show Answer Correct Answer: B) Colorfruitpet. 8. Data type for a whole number A) Float. B) Boolean. C) Integer. D) String. Show Answer Correct Answer: C) Integer. 9. What is the purpose of a computer program? A) To entertain users. B) To give instructions that a computer can execute to perform tasks. C) To create computer hardware. D) To connect to the internet. Show Answer Correct Answer: B) To give instructions that a computer can execute to perform tasks. 10. What does print("Good Job!") do? A) Says good job. B) Prints the sentence on screen. C) Saves a file. D) Shuts down computer. Show Answer Correct Answer: B) Prints the sentence on screen. 11. How can you change the turtle's color? A) Use turtle.setColor('color name'). B) Use turtle.color('color name') or turtle.color(r, g, b) for RGB values. C) Change the turtle's color by calling turtle.paint('color name'). D) Set the turtle's color with turtle.fill('color name'). Show Answer Correct Answer: B) Use turtle.color('color name') or turtle.color(r, g, b) for RGB values. 12. How are constants conventionally named in PLS? A) In lowercase characters. B) In camelCase characters. C) In uppercase characters. D) With special characters. Show Answer Correct Answer: C) In uppercase characters. 13. What is the output of the following code? "'pythonprint(2 ** 3) "' A) 6. B) 8. C) 9. D) 5. Show Answer Correct Answer: B) 8. 14. What role has Python started to play in the field of IT project testing, as mentioned in the passage? A) A minor role. B) Carrying out repeatable test procedures. C) Exclusively used for manual testing. D) Ignored in the testing process. Show Answer Correct Answer: B) Carrying out repeatable test procedures. 15. Name one fun thing you can do with Python. A) Tying shoes. B) Developing video games. C) Painting walls. D) Biking. Show Answer Correct Answer: B) Developing video games. 16. Python is a: A) Compiled language. B) Interpreted language. C) Both compiled and interpreted. D) None of the above. Show Answer Correct Answer: B) Interpreted language. 17. Which of the following is used to import a module in Python? A) Import. B) Include. C) Require. D) Using. Show Answer Correct Answer: A) Import. 18. What is the purpose of the 'input()' function in programming? A) Assign a value to a variable. B) Perform arithmetic calculations. C) Print output to the screen. D) Receive input from the user. Show Answer Correct Answer: D) Receive input from the user. 19. Manakah dari berikut ini yang merupakan nama variabel yang valid di Python? A) Variable@name. B) Variable1. C) 1variable. D) Variable-name. Show Answer Correct Answer: B) Variable1. 20. What is the purpose of the print() function? A) To define a variable. B) To create a loop. C) To perform mathematical calculations. D) To display output to the user. Show Answer Correct Answer: D) To display output to the user. 21. Which keyword is used to create a conditional statement in Python? A) Else. B) Elif. C) If-else. D) If. Show Answer Correct Answer: D) If. 22. What is an IDE? A) It is a program to identify problems on a program. B) It is a debugger. C) All of these are true. D) It is a source code editor. Show Answer Correct Answer: C) All of these are true. 23. Which function from the random module returns a random integer between two given integers, inclusive? A) Random.random(). B) Random.randint(). C) Random.uniform(). D) Random.choice(). Show Answer Correct Answer: B) Random.randint(). 24. Which of these is a valid comment line in Python? A) # This is a comment. B) // This is a comment. C) D) ** This is a comment. Show Answer Correct Answer: A) # This is a comment. 25. Is the not equal operator in python A) Not =. B) !=. C) X=. D) Not equal. Show Answer Correct Answer: B) !=. ← 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 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books