This quiz works best with JavaScript enabled. Home > Cbse > Class 11 > Science > Computer Science > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 27 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 27 (60 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What does IDLE stand for in Python? A) Integrated Development and Learning Environment. B) Interactive Development and Learning Environment. C) Integrated Design and Learning Environment. D) Interactive Design and Learning Environment. Show Answer Correct Answer: A) Integrated Development and Learning Environment. 2. What is the output of print('Hello', name, ', how are you today?')-Where name="Monty" A) Hello Monty. B) Hello, how are you today?. C) Hello Monty, how are you today?. D) Hello, name. Show Answer Correct Answer: C) Hello Monty, how are you today?. 3. How do you create a user-defined function with default parameters? A) Function my function(param1=default value1, param2=default value2) {}. B) Def my function(param1, param2):. C) Def my function(param1=default value1, param2=default value2):. D) My function(param1=default value1, param2). Show Answer Correct Answer: C) Def my function(param1=default value1, param2=default value2):. 4. The character that must be at the end of the line for if, while, for etc. A) :. B) ,. C) . D) ;. Show Answer Correct Answer: A) :. 5. Which type of memory is volatile and loses its data when the power is turned off? A) RAM. B) SSD. C) ROM. D) Hard Disk. Show Answer Correct Answer: A) RAM. 6. What is a DataFrame in Pandas? A) A two-dimensional labeled data structure like a table. B) A one-dimensional labeled data structure like a list. C) A data structure that only holds numerical data. D) A three-dimensional labeled data structure like a cube. Show Answer Correct Answer: A) A two-dimensional labeled data structure like a table. 7. To change a variable in the global scope from within a function we use which keyword? A) Return. B) Global. C) Def. D) Local. Show Answer Correct Answer: B) Global. 8. Which of the following is the correct syntax to create a NumPy array? A) Np.array([1, 2, 3]). B) Numpy.array([1, 2, 3]). C) Np.array((1, 2, 3)). D) All of the above. Show Answer Correct Answer: D) All of the above. 9. Which data type represnts a whole number? A) String. B) Boolean. C) Float. D) Integer. Show Answer Correct Answer: D) Integer. 10. Identify the term that describes the creation of a new object. A) Instantiation. B) Declare. C) Initialize. D) Iteration. Show Answer Correct Answer: A) Instantiation. 11. A developer creates t = (3, 4, 5) and wants to replace 4 with 7. What is the appropriate approach? A) Use append to add 7. B) Convert tuple to set and edit. C) Assign t[1] = 7 directly. D) Recreate a new tuple with 7. Show Answer Correct Answer: D) Recreate a new tuple with 7. 12. Which are the advantages of functions in python? A) Reducing duplication of code. B) Decomposing complex problems into simpler pieces. C) Improving clarity of the code. D) All of the mentioned. Show Answer Correct Answer: D) All of the mentioned. 13. What type of data is stored in the variable below?x = "Hello, World!" A) Integer. B) Float. C) Boolean. D) String. Show Answer Correct Answer: D) String. 14. Loop while akan berhenti ketika ..... A) Kondisi bernilai False. B) Dihentikan manual. C) Program selesai. D) Nilai variabel mencapai 0. Show Answer Correct Answer: A) Kondisi bernilai False. 15. What will be the output of the following code? "'pythonprint(5 + 3) "' A) 5 + 3. B) 53. C) 8. D) Error. Show Answer Correct Answer: C) 8. 16. How do you create a dictionary in Python? A) Using square brackets []. B) Using angle brackets <>. C) Using parentheses (). D) Using curly braces {}. Show Answer Correct Answer: D) Using curly braces {}. 17. Which statement best describes zip() when used on tuples of different lengths? A) Stops at the shortest tuple. B) Pads with None values. C) Repeats last element to match length. D) Raises a ValueError for mismatch. Show Answer Correct Answer: A) Stops at the shortest tuple. 18. ..... are special words that are used by Python interpreter to recognize thestructure of program. A) Operators. B) Identifiers. C) Keywords. D) Tokens. Show Answer Correct Answer: C) Keywords. 19. If you want to store multiple values in a single variable, which data type would you use? A) List. B) Int. C) Str. D) Float. Show Answer Correct Answer: A) List. 20. What is the output of the following code:print(3 * 'Python')? A) 3PythonPython. B) PythonPythonPythonPython. C) Python3Python3Python3. D) PythonPythonPython. Show Answer Correct Answer: D) PythonPythonPython. 21. Python can be used to design games and 3D graphics A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 22. Is the result of 9 + 4 * 2 A) 28. B) 39. C) 17. D) 26. Show Answer Correct Answer: C) 17. 23. Keyword check:In the statement age = 13, what is the value? A) =. B) Print. C) 13. D) Age. Show Answer Correct Answer: C) 13. 24. What word means creating instructions to solve a problem? A) Algorithm. B) Remix. C) Loop. D) Variable. Show Answer Correct Answer: A) Algorithm. 25. What do we call a loop within a loop? A) Forever loop. B) Multi-loop. C) Nested loop. D) Double loop. Show Answer Correct Answer: C) Nested loop. 26. Which mode would you typically use in Python to write larger programs and save them as .py files? A) Interactive mode. B) Batch mode. C) Debug mode. D) Script mode. Show Answer Correct Answer: D) Script mode. 27. The symbol for checking equality is: A) ==. B) =. C) <>. D) !=. Show Answer Correct Answer: A) ==. 28. Which keyword is used to skip the current iteration of a loop in Python? A) Break. B) Pass. C) Skip. D) Continue. Show Answer Correct Answer: D) Continue. 29. What is the result of 2 + 3 * 4 in Python? A) 5. B) 14. C) 10. D) 20. Show Answer Correct Answer: B) 14. 30. What will be the output of the following code snippet?print("Hello, World!") A) "Hello, World!". B) Error. C) Print("Hello, World!"). D) Hello, World!. Show Answer Correct Answer: D) Hello, World!. 31. Which symbol is used to print something in Python? A) Echo. B) Print. C) @. D) Show. Show Answer Correct Answer: B) Print. 32. Which translator converts a HLL program into machine language by converting and executing line by line A) Compiler. B) Interpreter. C) Assembler. D) All of these. Show Answer Correct Answer: B) Interpreter. 33. The integer and float data types are used to represent A) Numbers. B) Bananas. C) Code. D) Text. Show Answer Correct Answer: A) Numbers. 34. What is mentioned as the seed from which Python sprouted? A) The work of thousands of programmers. B) The continuous evolution of components. C) Guido van Rossum's initial idea. D) The spread of Python around the world. Show Answer Correct Answer: C) Guido van Rossum's initial idea. 35. The Boolean operator that returns true if EITHER of its operands are true A) And. B) Or. C) Not. D) Equal. Show Answer Correct Answer: B) Or. 36. For var1=input(); var2 = var1 + var1; print(var2). If the user enters 6, what is printed? A) 66. B) 10. C) Error. D) 5. Show Answer Correct Answer: A) 66. 37. What will be the output of the following Python code?x = ['ab', 'cd'] for i in x:i.upper() print(x) A) ['ab', 'cd']. B) ['AB', 'CD']. C) [none, none]. D) None of the mentioned. Show Answer Correct Answer: A) ['ab', 'cd']. 38. Who created Python and when was it released? A) James Gosling, 1995. B) Dennis Ritchie, 1972. C) Bjarne Stroustrup, 1985. D) Guido van Rossum, 1991. Show Answer Correct Answer: D) Guido van Rossum, 1991. 39. Which of the following statements will correctly assign the value "blue" to a variable called 'colour'? A) 'colour == "blue"'. B) 'colour:= "blue"'. C) '"blue" = colour'. D) 'colour = "blue"'. Show Answer Correct Answer: D) 'colour = "blue"'. 40. What is the output of the following code? "'pythonprint(12 / 4) "' A) 12. B) 3. C) 3.0. D) 4. Show Answer Correct Answer: C) 3.0. 41. Which function is used to convert a float to a string in Python? A) ConvertToString(). B) ToString(). C) FloatToString(). D) Str(). Show Answer Correct Answer: D) Str(). 42. List items have an index number. In the following list, which item has the index number of 3?["John", "Harry", "Jesse", "John", "Harry", "Harry"] A) "John". B) "Harry". C) "Jesse". D) None of the above. Show Answer Correct Answer: A) "John". 43. What does the statement 'print' do? A) Output a hard copy of a program to a printer. B) Output a message on the screen. C) Print a hard copy of a flowchart to a computer. D) None of the above. Show Answer Correct Answer: B) Output a message on the screen. 44. TRUE or FALSE:Python is a high level language A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 45. Which of the following is a built-in data structure in Python? A) Stack. B) List. C) Pointer. D) Array. Show Answer Correct Answer: B) List. 46. Which programming concept is implemented in Python as per the course objectives? A) Functional Programming. B) Logic Programming. C) Procedural Programming. D) Object Oriented Programming. Show Answer Correct Answer: D) Object Oriented Programming. 47. What will be the output of the following code? "'pythonprint(7 + 3.5) "' A) 7.35. B) 10. C) 735. D) 10.5. Show Answer Correct Answer: D) 10.5. 48. Who might use Python to make websites? A) A web developer. B) A driver. C) A gardener. D) A chef. Show Answer Correct Answer: A) A web developer. 49. When you have an error in your code what is the term to summarise finding and fixing that error? A) Syntax finder. B) Error finder. C) Debugging. D) Error checking. Show Answer Correct Answer: C) Debugging. 50. Which of the following is immutable (values that cannot be changed)? A) Set. B) List. C) Tuple. D) Dictionary. Show Answer Correct Answer: C) Tuple. 51. What is one advantage of Python's syntax? A) Verbose code structure. B) Readability and simplicity of syntax. C) Lack of flexibility. D) Complexity in syntax. Show Answer Correct Answer: B) Readability and simplicity of syntax. 52. Suppose listExample is ['h', 'e', 'l', 'l', 'o']what is len(listExample)? A) 5. B) 4. C) None. D) Error. Show Answer Correct Answer: A) 5. 53. Who developed Python programming? A) Guido Ray Rossum in 1995s. B) Guido Van Rossum in 1992s. C) Guido Ros Rossum in 1992s. D) Guido Van Rossum in 1990s. Show Answer Correct Answer: D) Guido Van Rossum in 1990s. 54. Which of the following is a valid way to create a dictionary in Python? A) Dict =. B) Dict = [key:value]. C) Dict = (key:value). D) Dict = {key:value}. Show Answer Correct Answer: D) Dict = {key:value}. 55. Can we add backdrops and sprites from the internet or our device? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 56. Which arithmetic operator would you use to find the product of two numbers? A) +. B) *. C) //. D) -. Show Answer Correct Answer: B) *. 57. Which of the following is used to check the identity of two objects in Python? A) ==. B) Is. C) =. D) In. Show Answer Correct Answer: B) Is. 58. Which of the following is a valid way to define a function in Python? A) Def myFunc():. B) Function myFunc(). C) MyFunc() = function. D) Create myFunc(). Show Answer Correct Answer: A) Def myFunc():. 59. Which of these is a string? A) Age. B) 13. C) "Year 9". D) =. Show Answer Correct Answer: C) "Year 9". 60. Variables in python are case sensitive? A) False. B) Not define. C) True. D) Can't say. Show Answer Correct Answer: C) True. ← PreviousNext →Related QuizzesScience QuizzesClass 11 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 8 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books