This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 83 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 83 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Write the output of the following:a=8; def abc(a):print(a); abc(7) A) 8. B) No Output. C) 7. D) Error. Show Answer Correct Answer: C) 7. 2. Code for Hello, World! A) Print Hello, World!. B) Print("Hello, World!). C) Print("Hello, World!"). D) None of the above. Show Answer Correct Answer: C) Print("Hello, World!"). 3. What will the following code return? type([1, 2, 3]) A) . B) . C) . D) . Show Answer Correct Answer: C) . 4. Suppose d = \{ "john" :40, "peter" :45\}to delete the entry for "john" what command do we use? A) D.delete( "john" :40). B) D.delete( "john" ). C) Del d[ "john" ]. D) Del d( "john" :40). Show Answer Correct Answer: C) Del d[ "john" ]. 5. The < ..... assignment operator in pseudocode is replaced by ..... in python A) ==. B) ( ). C) =. D) < The symbol is the same. Show Answer Correct Answer: C) =. 6. What is a syntax? A) Syntaxes are not written in a code to explain inner code workings. B) The symbols used in computer programming are called syntaxes. C) The rule following which different computer programs are written. D) All are correct. Show Answer Correct Answer: D) All are correct. 7. What will the following code output? print('Hello, ' + input('Enter your name:')) A) Hello, [user input]. B) Hello, Universe!. C) Hello, World!. D) Hello, name. Show Answer Correct Answer: A) Hello, [user input]. 8. What symbol is used to start a comment in Python? A) //. B) %%. C) . D) #. Show Answer Correct Answer: D) #. 9. Name one popular library in Python for machine learning. A) Pandas. B) Scikit-learn. C) TensorFlow. D) NumPy. Show Answer Correct Answer: B) Scikit-learn. 10. What is one of the main reasons Python is popular among beginners? A) Its simplicity and readability. B) Its complex syntax. C) Its limited library support. D) Its high cost. Show Answer Correct Answer: A) Its simplicity and readability. 11. What is the output of:print('Hi' + 'There')? A) HiThere. B) Hi There. C) Hi+There. D) Error. Show Answer Correct Answer: A) HiThere. 12. Fungsi dalam Python ditulis menggunakan kata kunci ..... A) Func. B) Def. C) Function. D) Define. Show Answer Correct Answer: B) Def. 13. What will be the output of the following code? "'pythonprint(type(3.5)) "' A) . B) . C) . D) . Show Answer Correct Answer: A) . 14. Which of the following symbols is used to place a multiline comment? A) +. B) #. C) '' ( or ' ). D) '' '' '' ( or ' ' ' ). Show Answer Correct Answer: D) '' '' '' ( or ' ' ' ). 15. What does forward(300) do? A) Moves in the direction it is facing 300 steps. B) Moves down the screen 300 steps. C) Moves up the screen 300 steps. D) None of the above. Show Answer Correct Answer: A) Moves in the direction it is facing 300 steps. 16. How is computer science divided into strands? A) By year level. B) By topic. C) By difficulty level. D) By student interest. Show Answer Correct Answer: B) By topic. 17. What do we use to define a block of code in Python language? A) Key. B) Brackets. C) Indentation. D) None of these. Show Answer Correct Answer: C) Indentation. 18. What is the purpose of the else statement in a control structure? A) The else statement executes code when the if condition is false. B) The else statement is used to handle exceptions in code. C) The else statement always executes first in a control structure. D) The else statement is used to define a loop. Show Answer Correct Answer: A) The else statement executes code when the if condition is false. 19. You need to store GPS coordinates that should never change. Which Python data structure best fits this need? A) Dictionary of floats. B) Tuple of floats. C) Mutable set. D) List of floats. Show Answer Correct Answer: B) Tuple of floats. 20. What is Data Science? A) Study of hardware. B) Extracting useful insights from data. C) Writing programs only. D) Data storage technique. Show Answer Correct Answer: B) Extracting useful insights from data. 21. Jenis data apa yang digunakan untuk menyimpan urutan karakter di Python? A) Int. B) Char. C) List. D) Str. Show Answer Correct Answer: D) Str. 22. Which of the following is a correct way to use the 'input()' function to ask for a user's name? A) Name = input("Enter your name: "). B) Name = input(Enter your name). C) Name = input("Enter your name"). D) Name = input(Enter your name:). Show Answer Correct Answer: A) Name = input("Enter your name: "). 23. Which of the following is the correct way to call a function named 'greet'? A) Call greet(). B) Greet. C) Greet(). D) Function greet(). Show Answer Correct Answer: C) Greet(). 24. What should you do if you encounter an error message in Python? A) Check and correct the code. B) Restart the computer. C) Delete the program. D) Ignore it. Show Answer Correct Answer: A) Check and correct the code. 25. What symbol is used to print something in Python? A) Echo. B) Print(). C) Say(). D) Write(). Show Answer Correct Answer: B) Print(). ← 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