| 1 | Using the pack manager, how you can you put the components in a container in the same row? | Component.pack(side= 'LEFT')Component.pack('Left ')Component.pack(side=LEFT)Component.pack(Left-side) | Component.pack(side=LEFT) | 
     
      | 2 | Which can be an Identifier among them in Python? | 1abc$12a_xy1@python | _xy1 | 
     
      | 3 | Choose the correct function to get the character from ASCII number | ascii(number)char(number)chr(number)none | chr(number) | 
     
      | 4 | Strings are immutable in Python, which means a string cannot be modified. | TrueFalsenoneall | True | 
     
      | 5 | Python does not support a character type a single character is treated as strings of length one. | FalseTrueNoneAll | True | 
     
      | 6 | Which method should I use to convert String "welcome to the beautiful world of python" to "Welcome To The Beautiful World Of Python" | capitalize()title()NoneAll | title() | 
     
      | 7 | ________ is an object-oriented programming language. | JavaC++PythonAll the above | All the above | 
     
      | 8 | Python is compiled language. True or False? | TrueFalseNoneAll | False | 
     
      | 9 | What is used to define a block of code (body of loop, function etc.) in Python? | Curly bracesParenthesisIndentationQuotation | Indentation | 
     
      | 10 | ________ is interpreted | PythonC++AdaPascal | Python | 
     
      | 11 | What is a correct syntax to output "Hello World" in Python? | print("Hello World")echo("Hello World")echo "Hello World"p("Hello World") | print("Hello World") | 
     
      | 12 | Which of the following statements is true? | Python is an interpreted language.Python is a high level programming language.Python is an object-oriented language.All of the above. | All of the above. | 
     
      | 13 | Standard Python implementation can import libraries written in which of the following languages? | C/C++JavaReactnone | C/C++ | 
     
      | 14 | Which of the following statements is true? | Python 3 is a newer version, but it is backward compatible with Python 2.Python 3 is a newer version, but it is not backward compatible with Python 2.A Python 2 program can always run on a Python 3 interpreter.A Python 3 program can always run on a Python 2 interpreter. | Python 3 is a newer version, but it is not backward compatible with Python 2. | 
     
      | 15 | Python syntax is case-sensitive | TrueFalseNoneAll | True | 
     
      | 16 | A ___________ error does not cause the program to abort, but produces incorrect results. | syntaxruntimelogicalnone | logical | 
     
      | 17 | What does the expression string1 + string2 do? | Repeats string1 string2 times (string2 must be in numeric format).Concatenates string1 and string2.Adds string1 to string2 (both must be in numeric format). | Concatenates string1 and string2. | 
     
      | 18 | Which of these should you include in order to pass variables to a script? | from sys import getargfrom system import argvfrom sys import argsfrom sys import argv | from sys import argv | 
     
      | 19 | Is it possible to link a Python program to code written in C? | Yes, the C code can be in a form of a dynamically or a statically linked library.No, it is impossible.Yes, but the C code must be provided in a form of a dynamically linked library.Yes, but C code must be provided in a form of statically linked library. | Yes, the C code can be in a form of a dynamically or a statically linked library. | 
     
      | 20 | To run python script file named test.py, use the command | execute python test.pyrun python test.pypython test.pygo python test.py | python test.py | 
     
      | 21 | What is the correct file extension for Python files? | .pyth.pt.pyt.py | .py | 
     
      | 22 | Is it possible to check for more than one error in one except line? | Yes, if the exception types are enclosed in parentheses.No, it is not possible.Yes, if the exception types are enclosed in square brackets.Yes, if the exception types are enclosed in curly braces. | Yes, if the exception types are enclosed in parentheses. | 
     
      | 23 | What does REPL mean in Python? | Robustly Executed Python LanguageRead, Execute, Python, LoopRealtime Evaluated Python LanguageRead, Evaluate, Print, Loop | Read, Evaluate, Print, Loop | 
     
      | 24 | Which of the following is a mutable data type? | A) StringB) TupleC) ListD) Integer | C) List | 
     
      | 25 | Which of the following is an immutable data type? | A) ListB) SetC) TupleD) Dictionary | C) Tuple | 
     
      | 26 | What does bool(0) return? | A) TrueB) FalseC) NoneD) Error | B) False | 
     
      | 27 | How can you convert a string to an integer? | A) int("123")B) str("123")C) float("123")D) None of the above | A) int("123") | 
     
      | 28 | How do you access the first character of a string s = "Hello"? | A) s[0]B) s[1]C) s.first()D) s.char(0) | A) s[0] | 
     
      | 29 | How do you convert a string to lowercase? | A) lower()B) toLower()C) lowercase()D) downcase() | A) lower() | 
     
      | 30 | Which method can be used to remove whitespace from both ends of a string? | A) trim()B) strip()C) clean()D) remove() | B) strip() | 
     
      | 31 | What does not True evaluate to? | A) TrueB) FalseC) NoneD) Error | B) False | 
     
      | 32 | What does 5 != 3 evaluate to? | A) TrueB) FalseC) 5D) 3 | A) True | 
     
      | 33 | How do you add an element to the end of a list? | A) append()B) add()C) insert()D) extend() | A) append() | 
     
      | 34 | How do you remove an item from a list? | A) delete(item)B) remove(item)C) pop(item)D) discard(item) | B) remove(item) | 
     
      | 35 | How do you create a tuple in Python? | A) [1, 2, 3]B) (1, 2, 3)C) {1, 2, 3}D) <1, 2, 3> | B) (1, 2, 3) | 
     
      | 36 | How do you access a value in a dictionary? | A) my_dict.keyB) my_dict[key]C) my_dict.get(key)D) B and C | D) B and C | 
     
      | 37 | How do you remove a key from a dictionary? | A) del my_dict[key]B) remove(key)C) pop(key)D) A and C | D) A and C | 
     
      | 38 | How do you raise an exception in Python? | A) raise ExceptionB) throw ExceptionC) A and BD) None of the above | A) raise Exception | 
     
      | 39 | What does the continue statement do? | A) Exits the loopB) Skips the current iteration and continues to the nextC) Terminates the programD) None of the above | B) Skips the current iteration and continues to the next | 
     
      | 40 | Which of the following can be used to check the data type of a variable? | A) type()B) isinstance()C) A and BD) checktype() | C) A and B | 
     
      | 41 | What is the output of print(2 ** 3)? | A) 6B) 8C) 9D) Error | B) 8 | 
     
      | 42 | What does list.pop(0) do? | A) Removes the last elementB) Removes the first elementC) Removes the element at index 0D) B and C | D) B and C | 
     
      | 43 | Which keyword is used to define a function in Python? | A) funcB) defineC) defD) function | C) def | 
     
      | 44 | How do you call a function named myFunction? | A) call myFunction()B) myFunction()C) myFunction.call()D) call.myFunction() | B) myFunction() | 
     
      | 45 | Which of the following is a way to return multiple values from a function? | A) return x, yB) return (x, y)C) Both A and BD) None of the above | C) Both A and B | 
     
      | 46 | What is the default return value of a function that does not explicitly return anything? | A) NoneB) 0C) 1D) Error | A) None | 
     
      | 47 | How do you define a default parameter in a function? | A) def my_function(x=1):B) def my_function(x:1):C) def my_function(x, 1):D) def my_function(x, default=1): | A) def my_function(x=1): | 
     
      | 48 | How do you define a function that takes no arguments? | A) def my_function():B) def my_function(x):C) def my_function(x=0):D) None of the above | A) def my_function(): | 
     
      | 49 | What is the purpose of the return statement? | A) To exit a functionB) To return a value from a functionC) Both A and BD) None of the above | C) Both A and B | 
     
      | 50 | Which of the following can be used to call a function? | A) myFunctionB) myFunction()C) call myFunction()D) A and C | B) myFunction() | 
     
      | 51 | How do you create a lambda function? | A) lambda x: x + 1B) def lambda(x): return x + 1C) function(x): return x + 1D) None of the above | A) lambda x: x + 1 | 
     
      | 52 | What is a class in Python? | A) A blueprint for creating objectsB) A built-in data typeC) A functionD) A module | A) A blueprint for creating objects | 
     
      | 53 | How do you create an instance of a class? | A) instance = ClassName()B) instance = new ClassName()C) instance = ClassName[]D) instance = ClassName.create() | A) instance = ClassName() | 
     
      | 54 | What is inheritance in OOP? | A) A way to create a new class from an existing classB) A method of data encapsulationC) A way to create multiple instancesD) A function of a class | A) A way to create a new class from an existing class | 
     
      | 55 | What is the purpose of the __init__ method? | A) To define a classB) To initialize an object’s attributesC) To call a methodD) To destroy an object | B) To initialize an object’s attributes | 
     
      | 56 | Which of the following is a characteristic of encapsulation? | A) Data hidingB) Code reusabilityC) PolymorphismD) Inheritance | A) Data hiding | 
     
      | 57 | What is polymorphism in Python? | A) The ability to define multiple methods with the same nameB) The ability to change class attributesC) The ability to create multiple classesD) The ability to inherit from multiple classes | A) The ability to define multiple methods with the same name | 
     
      | 58 | How do you define a subclass in Python? | A) class SubClass:B) class SubClass(ParentClass):C) class SubClass extends ParentClass:D) class SubClass implements ParentClass: | B) class SubClass(ParentClass): | 
     
      | 59 | What is method overriding? | A) Creating multiple methods with the same nameB) Defining a method in a subclass that already exists in the parent classC) Calling a method within itselfD) None of the above | B) Defining a method in a subclass that already exists in the parent class | 
     
      | 60 | What does the self keyword represent? | A) The instance of the classB) The class itselfC) A variable nameD) A global variable | A) The instance of the class | 
     
      | 61 | What is a class method? | A) A method that belongs to the class rather than any objectB) A method that modifies instance variablesC) A method that cannot be overriddenD) A method that takes no parameters | A) A method that belongs to the class rather than any object | 
     
      | 62 | How do you define a class method? | A) @staticmethodB) @classmethodC) @instanceD) @class | B) @classmethod | 
     
      | 63 | What is an abstract class? | A) A class with only abstract methodsB) A class that cannot be instantiatedC) A class with concrete implementationsD) Both A and B | D) Both A and B | 
     
      | 64 | What is a static method? | A) A method that cannot access instance variablesB) A method that can modify class stateC) A method that only works on class variablesD) A method that takes no parameters | A) A method that cannot access instance variables | 
     
      | 65 | What is the main purpose of using __str__ in a class? | A) To define a string representation of the objectB) To define how the object behavesC) To initialize the objectD) To override the constructor | A) To define a string representation of the object | 
     
      | 66 | How can you prevent a class from being subclassed? | A) By using a private constructorB) By using the final keywordC) By using __slots__D) By using metaclasses | D) By using metaclasses | 
     
      | 67 | What will happen if you do not implement an abstract method in a subclass? | A) The program will run without issuesB) An instance of the subclass can still be createdC) An error will be raisedD) The method will automatically have a default implementation | C) An error will be raised | 
     
      | 68 | What is method chaining? | A) Calling multiple methods in sequenceB) Returning self in methods to allow further callsC) Creating a loop of method callsD) None of the above | B) Returning self in methods to allow further calls | 
     
      | 69 | Which of the following is true about properties in Python? | A) Properties are used to create getter/setter methodsB) Properties are defined with the @property decoratorC) Properties provide a way to manage attribute accessD) All of the above | D) All of the above | 
     
      | 70 | What is the difference between a class variable and an instance variable? | A) Class variables are shared across all instances, instance variables are unique to each instanceB) Class variables are unique to each instance, instance variables are sharedC) There is no differenceD) Class variables are defined in the constructor | A) Class variables are shared across all instances, instance variables are unique to each instance | 
     
      | 71 | Which module provides the ABC (Abstract Base Class) functionality? | A) abcB) baseC) abstractD) class | A) abc |