ADVANCE PYTHON

1.   In MongoDB, install_compass is a platform-specific installation script for MongoDB Compass.
(A)   True
(B)   False
Answer:    (A)
2.   In MongoDB, the mongofiles utility makes it possible to manipulate files stored in your MongoDB.
(A)   True
(B)   False
Answer:    (A)
3.    MongoDB Enterprise provides mongoldap for testing MongoDB's LDAP configuration options against a running ___.
(A)   LDAP server
(B)   Set of servers.
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (C)
4.   MongoDB does not enable access control by default.
(A)   True
(B)   False
Answer:    (A)
5.   MongoDB employs Role-Based Access Control (RBAC) to govern access to a MongoDB system.
(A)   True
(B)   False
Answer:    (A)
6.   Amongst which of the following is / are the features of MongoDB?
(A)   Authentication
(B)   Encryption
(C)   Access control
(D)   All of the mentioned above
Answer:    (D)
7.   In MongoDB, mongoreplay is a ___.
(A)   Traffic capture
(B)   Replay tool
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (C)
8.   mongotop provides a method to track the amount of time a MongoDB instance mongod spends reading and writing data.
(A)   True
(B)   False
Answer:    (A)
9.   In MongoDB command, the ___ utility provides a quick overview of the status of a currently running mongod or mongos instance.
(A)   mongoexport
(B)   mongoexport
(C)   mongostat
(D)   None of the mentioned above
Answer:    (C)
10.   Amongst which of the following is / are used to create backup of database in MongoDB?
(A)   mongodump command
(B)   mongodelete command
(C)   mongotruncate command
(D)   None of the mentioned above
Answer:    (A)
11.   In MongoDB, Sharding is the process of ___ across multiple machines.
(A)   Drop data records
(B)   Storing data records
(C)   Truncate data records
(D)   All of the mentioned above
Answer:    (B)
12.   MongoDB achieves replication by the use of ___.
(A)   Replica set
(B)   Data set
(C)   $first
(D)   All of the mentioned above
Answer:    (A)
13.   Aggregation operations in MongoDB ___ values from multiple documents.
(A)   Data set
(B)   Set
(C)   Group
(D)   None of the mentioned above
Answer:    (C)
14.   To build the index in the background creates an index which does not block other database activities.
(A)   True
(B)   False
Answer:    (A)
15.   To create an index, you need to use ___ method of MongoDB.
(A)   createTable()
(B)   createIndex()
(C)   createdata()
(D)   None of the mentioned above
Answer:    (B)
16.   MongoDB provides the insert () command to insert documents into a collection.
(A)   True
(B)   False
Answer:    (A)
17.   Amongst which of the following is / are the data types of MongoDB?
(A)   Timestamp
(B)   Object
(C)   Symbol
(D)   All of the mentioned above
Answer:    (D)
18.   Amongst which of the following is / are the command used to create collection in MongoDB?
(A)   db.dropDatabase()
(B)   dcreateCollection()
(C)   Both A. and B.
(D)   None of the mentioned above
Answer:    (B)
19.   In MongoDB, db.dropDatabase () is used for ___.
(A)   Dropping Databases
(B)   Creating a Collection
(C)   Database Creation
(D)   None of the mentioned above
Answer:    (A)
20.   Database_name is a MongoDB command is used for ___.
(A)   Database Creation
(B)   Dropping Databases
(C)   Creating a Collection
(D)   All of the mentioned above
Answer:    (A)
21.   Amongst which of the following is / are the Integrated Feature Set of MongoDB –
(A)   Flexible with real-time applications
(B)   Greatly deals with analytics and data visualization
(C)   Event-driven streaming data pipelines
(D)   All of the mentioned above
Answer:    (D)
22.   MongoDB is rich in a flexible data model with dynamic schema –
(A)   True
(B)   False
Answer:    (A)
23.   Due to Distributed Data Platform, MongoDB can be run ensuring new levels of availability and scalability –
(A)   True
(B)   False
Answer:    (A)
24.   MongoDB meets the business requirements by –
(A)   It provides the right mix of technology and data for competitive advantage
(B)   It increasingly accelerated the time to value and lowered the total cost
(C)   It builds applications that are just not possible with traditional relational databases
(D)   All of the mentioned above
Answer:    (D)
25.   Amongst which of the following is / are show the need of MongoDB technology –
(A)   No downtime while the application is being scaled
(B)   Exceptional scalability feature
(C)   No downtime while the application is being scaled
(D)   All of the mentioned above
Answer:    (C)
26.   MongoDB was first developed by ___ Software in 2007.
(A)   9gen
(B)   10gen
(C)   12gen
(D)   All of the mentioned above
Answer:    (B)
27.   During the year ___, Dwight Merriman, Eliot Horowitz, and Kevin Ryan developed MongoDB.
(A)   2007
(B)   2008
(C)   2009
(D)   None of the mentioned above
Answer:    (A)
28.   NoSQL is not a ___.
(A)   Relational database
(B)   Network database
(C)   Communication set
(D)   None of the mentioned above
Answer:    (A)
29.   The data in MongoDB has a flexible schema?
(A)   True
(B)   False
Answer:    (A)
30.   MongoDB can provide high availability with replica sets?
(A)   True
(B)   False
Answer:    (A)
31.   Indexes can be created to improve the performance of searches within ___.
(A)   MongoDB
(B)   NoSQL
(C)   Both A. and B.
(D)   None of the mentioned above
Answer:    (C)
32.   MongoDB supports searching by ___.
(A)   Field
(B)   Range queries
(C)   Regular expression searches
(D)   All of the mentioned above
Answer:    (D)
33.   Field is a name-value pair in a ___.
(A)   Attribute
(B)   Table
(C)   Document
(D)   None of the mentioned above
Answer:    (C)
34.   Cursor is a pointer to the result set of a ___.
(A)   Query
(B)   Table
(C)   Dataset
(D)   None of the mentioned above
Answer:    (A)
35.   The document structure is more in line with how developers construct their ___.
(A)   Network and security
(B)   Classes and objects
(C)   Tables and relations
(D)   None of the mentioned above
Answer:    (B)
36.   Keyfile and X.509 are the internal authentication mechanisms in MongoDB.
(A)   True
(B)   False
Answer:    (A)
37.   Amongst which of the following is / are the client and user authentication mechanisms in MongoDB.
(A)   SCRAM-SHA-1
(B)   MongoDB Challenge and Response (MONGODB-CR)
(C)   Both A. and B.
(D)   None of the mentioned above
Answer:    (C)
38.   Amongst which of the following is / are true about the authentication ___.
(A)   It is a process of verifying the identity of a client
(B)   It is a process of verifying network
(C)   It is a process of verifying the database
(D)   None of the mentioned above
Answer:    (A)
39.   Aggregation's operations process data records and return computed results.
(A)   True
(B)   False
Answer:    (A)
40.   A document is a set of ___.
(A)   Key-value pairs
(B)   Application pairs
(C)   Activity pair set
(D)   None of the mentioned above
Answer:    (A)
41.   The Collections screen displays ___ for each collection in the selected database.
(A)   Collection name
(B)   Number of documents in the collection
(C)   Both A. and B.
(D)   None of the mentioned above
Answer:    (C)
42.   The Collections screen ___ the existing collections.
(A)   Lists
(B)   Package
(C)   Network
(D)   None of the mentioned above
Answer:    (A)
43.   MongoDB stores documents in ___.
(A)   Store
(B)   Collections
(C)   Indexes
(D)   None of the mentioned above
Answer:    (B)
44.   A record in MongoDB is a ___.
(A)   Document
(B)   Table
(C)   Application
(D)   None of the mentioned above
Answer:    (A)
45.   MongoDB is one of the leading NoSQL databases?
(A)   True
(B)   False
Answer:    (A)
46.   The data model available within MongoDB allows us to represent ___.
(A)   Hierarchical relationships
(B)   Able to handle complex structures
(C)   Both A. and B.
(D)   None of the mentioned above
Answer:    (C)
47.   Amongst which of the following is / are true about MongoDB?
(A)   MongoDB is a cross-platform database
(B)   Document oriented database
(C)   High performance database
(D)   All of the mentioned above
Answer:    (D)
48.   The writelines() method is used to write multiple strings to a file?
(A)   True
(B)   False
Answer:    (A)
49.   A text file contains only textual information consisting of ___.
(A)   Alphabets
(B)   Numbers
(C)   Special symbols
(D)   All of the mentioned above
Answer:    (D)
50.   Amongst which of the following is / are the method used to unpickling data from a binary file?
(A)   load()
(B)   set() method
(C)   dump() method
(D)   None of the mentioned above
Answer:    (B)
51.   Amongst which of the following is / are the method of convert Python objects for writing data in a binary file?
(A)   set() method
(B)   dump() method
(C)   load() method
(D)   None of the mentioned above
Answer:    (B)
52.   The module Pickle is used to ___.
(A)   Serializing Python object structure
(B)   De-serializing Python object structure
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (C)
53.   The readline() is used to read the data line by line from the text file.
(A)   True
(B)   False
Answer:    (A)
54.   Amongst which of the following function is / are used to create a file and writing data?
(A)   append()
(B)   open()
(C)   close()
(D)   None of the mentioned above
Answer:    (B)
55.   The seek() method is used to ___.
(A)   Saves the file in secondary storage
(B)   Position the file object at a particular position in a file
(C)   Deletes the file form secondary storage
(D)   None of the mentioned above
Answer:    (B)
56.   The write() method takes a string as an argument and ___.
(A)   writes it to the text file
(B)   read from the text file
(C)   append in a text file
(D)   None of the mentioned above
Answer:    (A)
57.   Python always makes sure that any unwritten or unsaved data is written to the file before it is closed?
(A)   True
(B)   False
Answer:    (A)
58.   The function file_object.close() is used to ___.
(A)   To open the existing file
(B)   To append in an opened file
(C)   To close an opened file
(D)   None of the mentioned above
Answer:    (C)
59.   Binary files are stored in the form of 0s and 1s?
(A)   True
(B)   False
Answer:    (A)
60.   Amongst which of the following is / are needed to open an existing file?
(A)   filename
(B)   mode
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (C)
61.   Amongst which of the following is / are the key functions used for file handling in Python?
(A)   open() and close()
(B)   read() and write()
(C)   append()
(D)   All of the mentioned above
Answer:    (D)
62.   File handling in Python refers the feature for reading data from the file and writing data into a file?
(A)   True
(B)   False
Answer:    (A)
63.   Scope and lifetime of a variable declared in a function exist till the function exists?
(A)   True
(B)   False
Answer:    (A)
64.   The return statement is used to exit a function?
(A)   True
(B)   False
Answer:    (A)
65.   A method refers to a function which is part of a class?
(A)   True
(B)   False
Answer:    (A)
66.   Can we pass List as an argument in Python function?
(A)   Yes
(B)   No
Answer:    (A)
67.   Amongst which of the following is a function which does not have any name?
(A)   Del function
(B)   Show function
(C)   Lambda function
(D)   None of the mentioned above
Answer:    (C)
68.   Amongst which of the following shows the types of function calls in Python?
(A)   Call by value
(B)   Call by reference
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (C)
69.   Once we have defined a function, we can call it?
(A)   True
(B)   False
Answer:    (A)
70.   A function is a group of related statements which designed specifically to perform a ___.
(A)   Write code
(B)   Specific task
(C)   Create executable file
(D)   None of the mentioned above
Answer:    (B)
71.   Amongst which of the following is / are true with reference to loops in Python?
(A)   It allows for code reusability to be achieved.
(B)   By utilizing loops, we avoid having to write the same code over and over again.
(C)   We can traverse through the elements of data structures by utilizing looping.
(D)   All of the mentioned above
Answer:    (D)
72.   The looping reduces the complexity of the problems to the ease of the problems?
(A)   True
(B)   False
Answer:    (A)
73.   The ___ is a built-in function that returns a range object that consists series of integer numbers, which we can iterate using a for loop.
(A)   range()
(B)   set()
(C)   dictionary{}
(D)   None of the mentioned above
Answer:    (A)
74.   Amongst which of the following is / are true about the while loop?
(A)   It continually executes the statements as long as the given condition is true
(B)   It first checks the condition and then jumps into the instructions
(C)   The loop stops running when the condition becomes fail, and control will move to the next line of code.
(D)   All of the mentioned above
Answer:    (D)
75.   The continue keyword is used to ___ the current iteration in a loop.
(A)   Initiate
(B)   Start
(C)   End
(D)   None of the mentioned above
Answer:    (C)
76.   With the break statement we can stop the loop before it has looped through all the items?
(A)   True
(B)   False
Answer:    (A)
77.   The for loop in Python is used to ___ over a sequence or other iterable objects.
(A)   Jump
(B)   Iterate
(C)   Switch
(D)   All of the mentioned above
Answer:    (B)
78.   Loops are known as ___ in programming.
(A)   Control flow statements
(B)   Conditional statements
(C)   Data structure statements
(D)   None of the mentioned above
Answer:    (A)
79.   In Python, the break and continue statements, together are called ___ statement.
(A)   Jump
(B)   goto
(C)   compound
(D)   None of the mentioned above
Answer:    (B)
80.   An ___ statement has less number of conditional checks than two successive ifs.
(A)   if else if
(B)   if elif
(C)   if-else
(D)   None of the mentioned above
Answer:    (C)
81.   In Python, ___ defines a block of statements.
(A)   Block
(B)   Loop
(C)   Indentation
(D)   None of the mentioned above
Answer:    (C)
82.   In a Python program, Nested if Statements denotes?
(A)   if statement inside another if statement
(B)   if statement outside the another if statement
(C)   Both A and B
(D)   None of the mentioned above
Answer:    (A)
83.   In Python, an else statement comes right after the block after 'if'?
(A)   True
(B)   False
Answer:    (A)
84.   Which of the following is false regarding conditional statement in Python?
(A)   If-elif is the shortcut for the if-else chain
(B)   We use the dictionary to replace the Switch case statement
(C)   We cannot use python classes to implement the switch case statement
(D)   None of the mentioned above
Answer:    (C)
85.   Which of the following is not used as conditional statement in Python?
(A)   switch
(B)   if...else
(C)   elif
(D)   None of the mentioned above
Answer:    (A)
86.   Amongst which of the following is / are the conditional statement in Python code?
(A)   if a<=100:
(B)   if (a >= 10)
(C)   if (a => 200)
(D)   None of the mentioned above
Answer:    (A)
87.   The if statement is the most fundamental decision-making statement?
(A)   True
(B)   False
Answer:    (A)
88.   Conditional statements are also known as ___ statements.
(A)   Decision-making
(B)   Array
(C)   List
(D)   None of the mentioned above
Answer:    (A)
89.   Python Literals is used to define the data that is given in a variable or constant?
(A)   True
(B)   False
Answer:    (A)
90.   Python Dictionary is used to store the data in a ___ format.
(A)   Key value pair
(B)   Group value pair
(C)   Select value pair
(D)   None of the mentioned above
Answer:    (A)
91.   The list.pop ([i]) removes the item at the given position in the list?
(A)   True
(B)   False
Answer:    (A)
92.   Amongst which of the following is / are the method of list?
(A)   append()
(B)   extend()
(C)   insert()
(D)   All of the mentioned above
Answer:    (D)
93.   The % operator returns the ___.
(A)   Quotient
(B)   Divisor
(C)   Remainder
(D)   None of the mentioned above
Answer:    (C)
94.   What is the name of the operator ** in Python?
(A)   Exponentiation
(B)   Modulus
(C)   Floor division
(D)   None of the mentioned above
Answer:    (A)
95.   Is Python supports exception handling?
(A)   Yes
(B)   No
Answer:    (A)
96.   Amongst which of the following is / are the logical operators in Python?
(A)   and
(B)   or
(C)   not
(D)   All of the mentioned above
Answer:    (D)
97.   Varbinary data type returns variable-width string up to a length of max-length bytes?
(A)   TRUE
(B)   FALSE
Answer:    (A)
98.   Binary data type is a fixed-width string of length bytes?
(A)   True
(B)   False
Answer:    (A)
99.   The type() function can be used to get the data type of any object.
(A)   True
(B)   False
Answer:    (A)
100.   bytes, bytearray, memoryview are type of the ___ data type.
(A)   Mapping Type
(B)   Boolean Type
(C)   Binary Types
(D)   None of the mentioned above
Answer:    (C)
101.   Float type of data type is represented by the float class.
(A)   True
(B)   False
Answer:    (A)
102.   list, tuple, and range are the ___ of Data Types.
(A)   Sequence Types
(B)   Binary Types
(C)   Boolean Types
(D)   None of the mentioned above
Answer:    (A)
103.   Amongst which of the following is / are the application areas of Python programming?
(A)   Web Development
(B)   Game Development
(C)   Artificial Intelligence and Machine Learning
(D)   All of the mentioned above
Answer:    (D)
104.   Amongst the following, who is the developer of Python programming?
(A)   Guido van Rossum
(B)   Denis Ritchie
(C)   Y. Khenderakar
(D)   None of the mentioned above
Answer:    (A)
105.   Python is a ___object-oriented programming language.
(A)   Special purpose
(B)   General purpose
(C)   Medium level programming language
(D)   All of the mentioned above
Answer:    (B)
106.   The .......... of a variable is the area of the program where it may be referenced
(A)   external
(B)   global
(C)   scope
(D)   local
Answer:    (C)
107.   function header and function definition is the same thing
(A)   True
(B)   False
Answer:    (B)
108.   The variable declared inside the function is called a ..........variable
(A)   global
(B)   local
(C)   external
(D)   none of the above
Answer:    (B)
109.   Actual parameter are the parameters specified within a pair of parenthesis in the function definition
(A)   True
(B)   false
Answer:    (B)
110.   You can call a function only once after defining it.
(A)   True
(B)   false
Answer:    (B)
111.   what will be the output of the given statement .board="CBSE" print(board[-1::1])
(A)   CBSE
(B)   ESBC
(C)   Generate Error
(D)   None of the above
Answer:    (A)
112.   what Wii be the output of the given statement. print("Study Trigger 2021".lower().count("t"))
(A)   2
(B)   1
(C)   Generate Error
(D)   None of the above
Answer:    (B)
113.   lower() and islower() are the same method in string.
(A)   True
(B)   False
Answer:    (A)
114.   ------ function is used to remove all the White spaces from the beginning of the string
(A)   remove()
(B)   ltrim()
(C)   rtrim()
(D)   isspace()
Answer:    (B)
115.   --------function is used to check whether all letters of the string are in capital or not
(A)   capitalize()
(B)   upper()
(C)   isupper()
(D)   toupper()
Answer:    (C)
116.   which function is used to check whether the string conatains a digit or not
(A)   digit()
(B)   todigit()
(C)   isdigit()
(D)   none of the above
Answer:    (C)
117.   how many times the word"Study" printed in the following code:word="CBSE 2021" for alpha in word[3:9]:print('Study's)
(A)   7 times
(B)   5 times
(C)   6 times
(D)   Generate Error in for loop
Answer:    (C)
118.   what will be the output of the given statement print("Study Trigger 2021"[6:14])
(A)   Study
(B)   Trigger
(C)   Generate Error
(D)   None of the above
Answer:    (B)
119.   what will be the output of the given statement print("Study":[1])
(A)   Study
(B)   S
(C)   t
(D)   Generate Error
Answer:    (C)
120.   strings are immutable .i.e you cannot change the individual letters of a string in place by assignment
(A)   TRUE
(B)   FALSE
Answer:    (A)
121.   if "name" is a string and "i" is index of that string. then name[:i]+name[i:] will return the complete string "name"
(A)   True
(B)   False
Answer:    (A)
122.   The extraction of substring from string is called
(A)   Substring
(B)   String
(C)   Slicing
(D)   None of the above
Answer:    (C)
123.   The opposite of ord()is
(A)   chr()
(B)   dro()
(C)   char()
(D)   str()
Answer:    (A)
124.   "Study" in "Study Trigger "will return
(A)   TRUE
(B)   FALSE
Answer:    (B)
125.   Which of the following is not a membership operators
(A)   >
(B)   not in
(C)   in
(D)   all of the above
Answer:    (A)
126.   print("Study"*3) //statement 1.print(3*"Study") //statement 2.both the above statement produce the same result
(A)   TRUE
(B)   FALSE
Answer:    (A)
127.   what will be the output of given statement. print("Study"+5)
(A)   StudyStudyStudyStudyStudy
(B)   Study5
(C)   Generate Error
(D)   None of the above
Answer:    (C)
128.   print(("Study"+"Trigger"+"2021")*3) //statement 1. print("Study"+"Trigger"+"2021"*3) //statement 2.Both the above statement produce same result
(A)   TRUE
(B)   FALSE
Answer:    (B)
129.   Which of the following is not a basic string operator
(A)   plus sign(+)
(B)   *
(C)   in
(D)   all of the above
Answer:    (C)
130.   string index is Bi-Direction
(A)   TRUE
(B)   FALSE
Answer:    (A)
131.   A ----------- is a sequence of characters
(A)   Numeric
(B)   Decimal
(C)   String
(D)   None of the above
Answer:    (C)
132.   if you want to communicate between functions i.e callinf and called statement then you should use
(A)   value
(B)   return
(C)   arguement
(D)   none of above
Answer:    (C)
133.   these are predrfined functions that arw always available for use. For using them we dont need to import any module
(A)   built function
(B)   pre defined function
(C)   user defined
(D)   none of above
Answer:    (A)
134.   python passes parameter by value
(A)   TRUE
(B)   FALSE
Answer:    (A)
135.   a function in python is a waste without calling it
(A)   TRUE
(B)   FALSE
Answer:    (A)
136.   Value returning function should be called from inside expression
(A)   TRUE
(B)   FALSE
Answer:    (A)
137.   The syntax of function call and declaration is very similar, except that the keyword - - - - and - - - -are missing.
(A)   colon, def
(B)   argument, def
(C)   def, parameters
(D)   none
Answer:    (A)
138.   These are Predefined functions that are available in a midule. For using them we need to import module.
(A)   built function
(B)   pre define function
(C)   user-defined
(D)   function define in module
Answer:    (D)
139.   Every Functions return a value if function do not explicity return a value,then it will return - - - - - -
(A)   return
(B)   None
(C)   value
(D)   all
Answer:    (B)
140.   Python passes arguments to function by - - - -
(A)   reference
(B)   value
(C)   both
(D)   none of the above
Answer:    (B)
141.   Functions provide a - - - - -mechanism.The same function can be called any number of times.
(A)   call
(B)   reuse
(C)   define
(D)   none of the above
Answer:    (B)
142.   The variable declared outside a function is called a global variable.
(A)   TRUE
(B)   FALSE
Answer:    (A)
143.   read the following statement and find the output T1=(((('x',5),'y','z'),'w',6),'u',7) print=len(T1)
(A)   8
(B)   3
(C)   4
(D)   none of above
Answer:    (B)
144.   creating individual values from a tuple's element is called________
(A)   collection
(B)   unpacking
(C)   packing
(D)   none of above
Answer:    (B)
145.   range() is used to specify the length of for-in loop
(A)   TRUE
(B)   FALSE
Answer:    (A)
146.   by using _______ function you can check the value of a variable
(A)   id()
(B)   type()
(C)   print()
(D)   all of above
Answer:    (C)
147.   which of the following are the component(s) of a variable
(A)   id
(B)   value
(C)   type
(D)   all of above
Answer:    (D)
148.   in a nested loop, a break statement terminates alll the nested loop
(A)   TRUE
(B)   FALSE
Answer:    (B)
149.   the __________ statement in python is used when a statement is required syntactically but you don’t want any command or code to execute
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (A)
150.   the _______ statement is opposite of break statement, instead of teminating the loop, it forces to execute the next iteration of the loop
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (C)
151.   the __________ statement is used to terminate the lhe loop or the statement in which it is present
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (B)
152.   what will be the output of the given statement, if you will enter 9 7 a,b=int(input("Enter a number")),int(input("Enter a number")) print (a,b)
(A)   9 7
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
153.   what will be the output of the given statement, if you will enter 9 a=b=int(input("Enter a number")) print(a,b)
(A)   9 9
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
154.   ___________ conversions is user defined conversion that forces and expression to be of specific type
(A)   implicit
(B)   explicit
(C)   both a and b
(D)   none of the above
Answer:    (B)
155.   the variable pointing toa value of a certain type of certain type can be made to point to a value of a different type. This is called _____
(A)   Type casting
(B)   static typing
(C)   dynamic typing
(D)   none of the above
Answer:    (C)
156.   which of the following is not a valid identifier
(A)   Myfile
(B)   IF
(C)   file_13
(D)   29_file
Answer:    (B)
157.   which of the following is not a token
(A)   keywords
(B)   operators
(C)   punctuators
(D)   comments
Answer:    (A)
158.   find the output of the following code:
(A)   9,none
(B)   9,9
(C)   none,none
(D)   none of the above
Answer:    (A)
159.   In python, parameters and argumentsbare the same thing.
(A)   TRUE
(B)   FALSE
Answer:    (B)
160.   A function is said to be ..........if it calls itself.
(A)   built function
(B)   pre define function
(C)   recursive
(D)   all
Answer:    (C)
161.   ........is the biank space in the beginning of a statement within a block.
(A)   indentation
(B)   space
(C)   body
(D)   none of the above
Answer:    (A)
162.   A local variable having the same name as global variable
(A)   TRUE
(B)   False
Answer:    (A)
163.   A .........is basically a block of code that will execute only when it is called.
(A)   function
(B)   sub program
(C)   block
(D)   all
Answer:    (A)
164.   In python function can be return be only one value.
(A)   TRUE
(B)   False
Answer:    (B)
165.   What arithmetic operators cannot be used with strings?
(A)   +
(B)   *
(C)   –
(D)   All of the mentioned
Answer:    (C)
166.   Operators with the same precedence are evaluated in which manner?
(A)   Left to Right
(B)   Right to Left
(C)   Can’t say
(D)   None of the mentioned
Answer:    (A)
167.   What is the answer to this expression, 22 % 3 is?
(A)   7
(B)   1
(C)   0.0
(D)   5
Answer:    (B)
168.   Which one of these is floor division?
(A)   /
(B)   //
(C)   %
(D)   None of the mentioned
Answer:    (B)
169.   Which is the correct operator for power(xy)?
(A)   X^y
(B)   X**y
(C)   X^^y
(D)   None of the mentioned
Answer:    (B)
170.   Which of the following cannot be a variable?
(A)   __init__
(B)   in
(C)   it
(D)   on
Answer:    (B)
171.    Which of the following is an invalid statement?
(A)   abc = 1,000,000
(B)   a b c = 1000 2000 3000
(C)   a,b,c = 1000, 2000, 3000
(D)   a_b_c = 1,000,000
Answer:    (B)
172.   Which of the following is true for variable names in Python?
(A)   unlimited length
(B)   all private members must have leading and trailing underscores
(C)   underscore and ampersand are the only two special characters allowed
(D)   none of the mentioned
Answer:    (A)
173.   Which of the following is true for variable names in Python?
(A)   unlimited length
(B)   all private members must have leading and trailing underscores
(C)   underscore and ampersand are the only two special characters allowed
(D)   none of the mentioned
Answer:    (A)
174.   All keywords in Python are in _________
(A)   lower case
(B)   UPPER CASE
(C)   Capitalized
(D)   None of the mentioned
Answer:    (D)
175.   Which of the following is not a keyword?
(A)   eval
(B)   assert
(C)   nonlocal
(D)   pass
Answer:    (A)
176.   Why are local variable names beginning with an underscore discouraged?
(A)   they are used to indicate a private variables of a class
(B)   they confuse the interpreter
(C)   they are used to indicate global variables
(D)   they slow down execution
Answer:    (A)
177.   Which of the following is an invalid variable?
(A)   my_string_1
(B)   1st_string
(C)   foo
(D)   _
Answer:    (B)
178.   What is the maximum possible length of an identifier?
(A)   31 characters
(B)   63 characters
(C)   79 characters
(D)   none of the mentioned
Answer:    (D)
179.   Is Python case sensitive when dealing with identifiers?
(A)   yes
(B)   no
(C)   machine dependent
(D)   none of the mentioned
Answer:    (A)
180.   The process of pickling in Python includes ____________
(A)   conversion of a Python object hierarchy into byte stream
(B)   conversion of a datatable into a list
(C)   conversion of a byte stream into Python object hierarchy
(D)   conversion of a list into a datatable
Answer:    (A)
181.   Which of the following is the use of id() function in python?
(A)   Every object in Python doesn’t have a unique id
(B)   In Python Id function returns the identity of the object
(C)   None of the mentioned
(D)   All of the mentioned
Answer:    (B)
182.   What is output of print(math.pow(3, 2))?
(A)   9
(B)   None
(C)   9
(D)   None of the mentioned
Answer:    (A)
183.   Which of the following is a feature of Python DocString?
(A)   In Python all functions should have a docstring
(B)   Docstrings can be accessed by the __doc__ attribute on objects
(C)   It provides a convenient way of associating documentation with Python modules, functions, classes, and methods
(D)   All of the mentioned
Answer:    (D)
184.   What are the two main types of functions in Python?
(A)   System function
(B)   Custom function
(C)   Built-in function & User defined function
(D)   User function
Answer:    (C)
185.   What is the maximum possible length of an identifier in Python?
(A)   79 characters
(B)   31 characters
(C)   63 characters
(D)   none of the mentioned
Answer:    (D)
186.   Which one of the following is the use of function in python?
(A)   Functions don’t provide better modularity for your application
(B)   you can’t also create your own functions
(C)   Functions are reusable pieces of programs
(D)   All of the mentioned
Answer:    (C)
187.   To add a new element to a list we use which Python command?
(A)   list1.addEnd(5)
(B)   list1.addLast(5)
(C)   list1.append(5)
(D)   list1.add(5)
Answer:    (C)
188.   Which of the following statements is used to create an empty set in Python?
(A)   ( )
(B)   [ ]
(C)   { }
(D)   set()
Answer:    (D)
189.   What arithmetic operators cannot be used with strings in Python?
(A)   *
(B)   –
(C)   +
(D)   All of the mentioned
Answer:    (B)
190.   What is the order of namespaces in which Python looks for an identifier?
(A)   Python first searches the built-in namespace, then the global namespace and finally the local namespace
(B)   Python first searches the built-in namespace, then the local namespace and finally the global namespace
(C)   Python first searches the local namespace, then the global namespace and finally the built-in namespace
(D)   Python first searches the global namespace, then the local namespace and finally the built-in namespace
Answer:    (C)
191.   Which of these is the definition for packages in Python?
(A)   A set of main modules
(B)   A folder of python modules
(C)   A number of files containing Python definitions and statements
(D)   A set of programs making use of Python modules
Answer:    (B)
192.   Which of the following is not a core data type in Python programming?
(A)   Tuples
(B)   Lists
(C)   Class
(D)   Dictionary
Answer:    (C)
193.   Which of the following is the use of id() function in python?
(A)   Every object doesn’t have a unique id
(B)   Id returns the identity of the object
(C)   All of the mentioned
(D)   None of the mentioned
Answer:    (B)
194.   Which of the following is the truncation division operator in Python?
(A)   |
(B)   //
(C)   /
(D)   %
Answer:    (B)
195.   Which of the following is true for variable names in Python?
(A)   underscore and ampersand are the only two special characters allowed
(B)   unlimited length
(C)   all private members must have leading and trailing underscores
(D)   none of the mentioned
Answer:    (B)
196.   What does pip stand for python?
(A)   unlimited length
(B)   all private members must have leading and trailing underscores
(C)   Preferred Installer Program
(D)   none of the mentioned
Answer:    (C)
197.   What is the order of precedence in python?
(A)   Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
(B)   Exponential, Parentheses, Division, Multiplication, Addition, Subtraction
(C)   Parentheses, Exponential, Multiplication, Division, Subtraction, Addition
(D)   Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Answer:    (D)
198.   Python supports the creation of anonymous functions at runtime, using a construct called __________
(A)   pi
(B)   anonymous
(C)   lambda
(D)   none of the mentioned
Answer:    (C)
199.   Which of the following functions can help us to find the version of python that we are currently working on?
(A)   sys.version(1)
(B)   sys.version(0)
(C)   sys.version()
(D)   sys.version
Answer:    (A)
200.   Which of the following character is used to give single-line comments in Python?
(A)   //
(B)   #
(C)   !
(D)   /*
Answer:    (B)
1.   Which keyword is used for function in Python language?
(A)   Function
(B)   Def
(C)   Fun
(D)   Define
Answer:    (B)
2.   Which of the following is used to define a block of code in Python language?
(A)   Indentation
(B)   Key
(C)   Brackets
(D)   All of the mentioned
Answer:    (A)
3.   All keywords in Python are in _________
(A)   Capitalized
(B)   lower case
(C)   UPPER CASE
(D)   None of the mentioned
Answer:    (D)
4.   Is Python code compiled or interpreted?
(A)   Python code is both compiled and interpreted
(B)   Python code is neither compiled nor interpreted
(C)   Python code is only compiled
(D)   Python code is only interpreted
Answer:    (B)
5.   Which of the following is the correct extension of the Python file?
(A)   .python
(B)   .pl
(C)   .py
(D)   .p
Answer:    (C)
6.   Is Python case sensitive when dealing with identifiers?
(A)   no
(B)   yes
(C)   machine dependent
(D)   none of the mentioned
Answer:    (A)
7.   Which type of Programming does Python support?
(A)   object-oriented programming
(B)   structured programming
(C)   functional programming
(D)   all of the mentioned
Answer:    (D)
8.   Who developed Python Programming Language?
(A)   Wick van Rossum
(B)   Rasmus Lerdorf
(C)   Guido van Rossum
(D)   Niene Stom
Answer:    (C)
9.   The .......... of a variable is the area of the program where it may be referenced
(A)   external
(B)   global
(C)   scope
(D)   local
Answer:    (C)
10.   function header and function definition is the same thing
(A)   True
(B)   False
Answer:    (B)
11.   The variable declared inside the function is called a ..........variable
(A)   global
(B)   local
(C)   external
(D)   none of the above
Answer:    (B)
12.   Actual parameter are the parameters specified within a pair of parenthesis in the function definition
(A)   True
(B)   false
Answer:    (B)
13.   You can call a function only once after defining it.
(A)   True
(B)   false
Answer:    (B)
14.   what will be the output of the given statement .board="CBSE" print(board[-1::1])
(A)   CBSE
(B)   ESBC
(C)   Generate Error
(D)   None of the above
Answer:    (A)
15.   what Wii be the output of the given statement. print("Study Trigger 2021".lower().count("t"))
(A)   2
(B)   1
(C)   Generate Error
(D)   None of the above
Answer:    (B)
16.   lower() and islower() are the same method in string.
(A)   True
(B)   False
Answer:    (A)
17.   ------ function is used to remove all the White spaces from the beginning of the string
(A)   remove()
(B)   ltrim()
(C)   rtrim()
(D)   isspace()
Answer:    (B)
18.   --------function is used to check whether all letters of the string are in capital or not
(A)   capitalize()
(B)   upper()
(C)   isupper()
(D)   toupper()
Answer:    (C)
19.   which function is used to check whether the string conatains a digit or not
(A)   digit()
(B)   todigit()
(C)   isdigit()
(D)   none of the above
Answer:    (C)
20.   how many times the word"Study" printed in the following code:word="CBSE 2021" for alpha in word[3:9]:print('Study's)
(A)   7 times
(B)   5 times
(C)   6 times
(D)   Generate Error in for loop
Answer:    (C)
21.   what will be the output of the given statement print("Study Trigger 2021"[6:14])
(A)   Study
(B)   Trigger
(C)   Generate Error
(D)   None of the above
Answer:    (B)
22.   what will be the output of the given statement print("Study":[1])
(A)   Study
(B)   S
(C)   t
(D)   Generate Error
Answer:    (C)
23.   strings are immutable .i.e you cannot change the individual letters of a string in place by assignment
(A)   TRUE
(B)   FALSE
Answer:    (A)
24.   if "name" is a string and "i" is index of that string. then name[:i]+name[i:] will return the complete string "name"
(A)   True
(B)   False
Answer:    (A)
25.   The extraction of substring from string is called
(A)   Substring
(B)   String
(C)   Slicing
(D)   None of the above
Answer:    (C)
26.   The opposite of ord()is
(A)   chr()
(B)   dro()
(C)   char()
(D)   str()
Answer:    (A)
27.   "Study" in "Study Trigger "will return
(A)   TRUE
(B)   FALSE
Answer:    (B)
28.   Which of the following is not a membership operators
(A)   >
(B)   not in
(C)   in
(D)   all of the above
Answer:    (A)
29.   print("Study"*3) //statement 1.print(3*"Study") //statement 2.both the above statement produce the same result
(A)   TRUE
(B)   FALSE
Answer:    (A)
30.   what will be the output of given statement. print("Study"+5)
(A)   StudyStudyStudyStudyStudy
(B)   Study5
(C)   Generate Error
(D)   None of the above
Answer:    (C)
31.   print(("Study"+"Trigger"+"2021")*3) //statement 1. print("Study"+"Trigger"+"2021"*3) //statement 2.Both the above statement produce same result
(A)   TRUE
(B)   FALSE
Answer:    (B)
32.   Which of the following is not a basic string operator
(A)   plus sign(+)
(B)   *
(C)   in
(D)   all of the above
Answer:    (C)
33.   string index is Bi-Direction
(A)   TRUE
(B)   FALSE
Answer:    (A)
34.   A ----------- is a sequence of characters
(A)   Numeric
(B)   Decimal
(C)   String
(D)   None of the above
Answer:    (C)
35.   if you want to communicate between functions i.e callinf and called statement then you should use
(A)   value
(B)   return
(C)   arguement
(D)   none of above
Answer:    (C)
36.   these are predrfined functions that arw always available for use. For using them we dont need to import any module
(A)   built function
(B)   pre defined function
(C)   user defined
(D)   none of above
Answer:    (A)
37.   python passes parameter by value
(A)   TRUE
(B)   FALSE
Answer:    (A)
38.   a function in python is a waste without calling it
(A)   TRUE
(B)   FALSE
Answer:    (A)
39.   Value returning function should be called from inside expression
(A)   TRUE
(B)   FALSE
Answer:    (A)
40.   The syntax of function call and declaration is very similar, except that the keyword - - - - and - - - -are missing.
(A)   colon, def
(B)   argument, def
(C)   def, parameters
(D)   none
Answer:    (A)
41.   These are Predefined functions that are available in a midule. For using them we need to import module.
(A)   built function
(B)   pre define function
(C)   user-defined
(D)   function define in module
Answer:    (D)
42.   Every Functions return a value if function do not explicity return a value,then it will return - - - - - -
(A)   return
(B)   None
(C)   value
(D)   all
Answer:    (B)
43.   Python passes arguments to function by - - - -
(A)   reference
(B)   value
(C)   both
(D)   none of the above
Answer:    (B)
44.   Functions provide a - - - - -mechanism.The same function can be called any number of times.
(A)   call
(B)   reuse
(C)   define
(D)   none of the above
Answer:    (B)
45.   The variable declared outside a function is called a global variable.
(A)   TRUE
(B)   FALSE
Answer:    (A)
46.   read the following statement and find the output T1=(((('x',5),'y','z'),'w',6),'u',7) print=len(T1)
(A)   8
(B)   3
(C)   4
(D)   none of above
Answer:    (B)
47.   creating individual values from a tuple's element is called________
(A)   collection
(B)   unpacking
(C)   packing
(D)   none of above
Answer:    (B)
48.   range() is used to specify the length of for-in loop
(A)   TRUE
(B)   FALSE
Answer:    (A)
49.   by using _______ function you can check the value of a variable
(A)   id()
(B)   type()
(C)   print()
(D)   all of above
Answer:    (C)
50.   which of the following are the component(s) of a variable
(A)   id
(B)   value
(C)   type
(D)   all of above
Answer:    (D)
51.   in a nested loop, a break statement terminates alll the nested loop
(A)   TRUE
(B)   FALSE
Answer:    (B)
52.   the __________ statement in python is used when a statement is required syntactically but you don’t want any command or code to execute
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (A)
53.   the _______ statement is opposite of break statement, instead of teminating the loop, it forces to execute the next iteration of the loop
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (C)
54.   the __________ statement is used to terminate the lhe loop or the statement in which it is present
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (B)
55.   what will be the output of the given statement, if you will enter 9 7 a,b=int(input("Enter a number")),int(input("Enter a number")) print (a,b)
(A)   9 7
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
56.   what will be the output of the given statement, if you will enter 9 a=b=int(input("Enter a number")) print(a,b)
(A)   9 9
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
57.   ___________ conversions is user defined conversion that forces and expression to be of specific type
(A)   implicit
(B)   explicit
(C)   both a and b
(D)   none of the above
Answer:    (B)
58.   the variable pointing toa value of a certain type of certain type can be made to point to a value of a different type. This is called _____
(A)   Type casting
(B)   static typing
(C)   dynamic typing
(D)   none of the above
Answer:    (C)
59.   which of the following is not a valid identifier
(A)   Myfile
(B)   IF
(C)   file_13
(D)   29_file
Answer:    (B)
60.   which of the following is not a token
(A)   keywords
(B)   operators
(C)   punctuators
(D)   comments
Answer:    (A)
61.   find the output of the following code:
(A)   9,none
(B)   9,9
(C)   none,none
(D)   none of the above
Answer:    (A)
62.   In python, parameters and argumentsbare the same thing.
(A)   TRUE
(B)   FALSE
Answer:    (B)
63.   A function is said to be ..........if it calls itself.
(A)   built function
(B)   pre define function
(C)   recursive
(D)   all
Answer:    (C)
64.   ........is the biank space in the beginning of a statement within a block.
(A)   indentation
(B)   space
(C)   body
(D)   none of the above
Answer:    (A)
65.   A local variable having the same name as global variable
(A)   TRUE
(B)   False
Answer:    (A)
66.   A .........is basically a block of code that will execute only when it is called.
(A)   function
(B)   sub program
(C)   block
(D)   all
Answer:    (A)
67.   In python function can be return be only one value.
(A)   TRUE
(B)   False
Answer:    (B)
68.   The .......... of a variable is the area of the program where it may be referenced
(A)   external
(B)   global
(C)   scope
(D)   local
Answer:    (C)
69.   function header and function definition is the same thing
(A)   True
(B)   False
Answer:    (B)
70.   The variable declared inside the function is called a ..........variable
(A)   global
(B)   local
(C)   external
(D)   none of the above
Answer:    (B)
71.   Actual parameter are the parameters specified within a pair of parenthesis in the function definition
(A)   True
(B)   false
Answer:    (B)
72.   You can call a function only once after defining it.
(A)   True
(B)   false
Answer:    (B)
73.   what will be the output of the given statement .board="CBSE" print(board[-1::1])
(A)   CBSE
(B)   ESBC
(C)   Generate Error
(D)   None of the above
Answer:    (A)
74.   what Wii be the output of the given statement. print("Study Trigger 2021".lower().count("t"))
(A)   2
(B)   1
(C)   Generate Error
(D)   None of the above
Answer:    (B)
75.   lower() and islower() are the same method in string.
(A)   True
(B)   False
Answer:    (A)
76.   ------ function is used to remove all the White spaces from the beginning of the string
(A)   remove()
(B)   ltrim()
(C)   rtrim()
(D)   isspace()
Answer:    (B)
77.   --------function is used to check whether all letters of the string are in capital or not
(A)   capitalize()
(B)   upper()
(C)   isupper()
(D)   toupper()
Answer:    (C)
78.   which function is used to check whether the string conatains a digit or not
(A)   digit()
(B)   todigit()
(C)   isdigit()
(D)   none of the above
Answer:    (C)
79.   how many times the word"Study" printed in the following code:word="CBSE 2021" for alpha in word[3:9]:print('Study's)
(A)   7 times
(B)   5 times
(C)   6 times
(D)   Generate Error in for loop
Answer:    (C)
80.   what will be the output of the given statement print("Study Trigger 2021"[6:14])
(A)   Study
(B)   Trigger
(C)   Generate Error
(D)   None of the above
Answer:    (B)
81.   what will be the output of the given statement print("Study":[1])
(A)   Study
(B)   S
(C)   t
(D)   Generate Error
Answer:    (C)
82.   strings are immutable .i.e you cannot change the individual letters of a string in place by assignment
(A)   TRUE
(B)   FALSE
Answer:    (A)
83.   if "name" is a string and "i" is index of that string. then name[:i]+name[i:] will return the complete string "name"
(A)   True
(B)   False
Answer:    (A)
84.   The extraction of substring from string is called
(A)   Substring
(B)   String
(C)   Slicing
(D)   None of the above
Answer:    (C)
85.   The opposite of ord()is
(A)   chr()
(B)   dro()
(C)   char()
(D)   str()
Answer:    (A)
86.   "Study" in "Study Trigger "will return
(A)   TRUE
(B)   FALSE
Answer:    (B)
87.   Which of the following is not a membership operators
(A)   >
(B)   not in
(C)   in
(D)   all of the above
Answer:    (A)
88.   print("Study"*3) //statement 1.print(3*"Study") //statement 2.both the above statement produce the same result
(A)   TRUE
(B)   FALSE
Answer:    (A)
89.   what will be the output of given statement. print("Study"+5)
(A)   StudyStudyStudyStudyStudy
(B)   Study5
(C)   Generate Error
(D)   None of the above
Answer:    (C)
90.   print(("Study"+"Trigger"+"2021")*3) //statement 1. print("Study"+"Trigger"+"2021"*3) //statement 2.Both the above statement produce same result
(A)   TRUE
(B)   FALSE
Answer:    (B)
91.   Which of the following is not a basic string operator
(A)   plus sign(+)
(B)   *
(C)   in
(D)   all of the above
Answer:    (C)
92.   string index is Bi-Direction
(A)   TRUE
(B)   FALSE
Answer:    (A)
93.   A ----------- is a sequence of characters
(A)   Numeric
(B)   Decimal
(C)   String
(D)   None of the above
Answer:    (C)
94.   if you want to communicate between functions i.e callinf and called statement then you should use
(A)   value
(B)   return
(C)   arguement
(D)   none of above
Answer:    (C)
95.   these are predrfined functions that arw always available for use. For using them we dont need to import any module
(A)   built function
(B)   pre defined function
(C)   user defined
(D)   none of above
Answer:    (A)
96.   python passes parameter by value
(A)   TRUE
(B)   FALSE
Answer:    (A)
97.   a function in python is a waste without calling it
(A)   TRUE
(B)   FALSE
Answer:    (A)
98.   Value returning function should be called from inside expression
(A)   TRUE
(B)   FALSE
Answer:    (A)
99.   The syntax of function call and declaration is very similar, except that the keyword - - - - and - - - -are missing.
(A)   colon, def
(B)   argument, def
(C)   def, parameters
(D)   none
Answer:    (A)
100.   These are Predefined functions that are available in a midule. For using them we need to import module.
(A)   built function
(B)   pre define function
(C)   user-defined
(D)   function define in module
Answer:    (D)
101.   Every Functions return a value if function do not explicity return a value,then it will return - - - - - -
(A)   return
(B)   None
(C)   value
(D)   all
Answer:    (B)
102.   Python passes arguments to function by - - - -
(A)   reference
(B)   value
(C)   both
(D)   none of the above
Answer:    (B)
103.   Functions provide a - - - - -mechanism.The same function can be called any number of times.
(A)   call
(B)   reuse
(C)   define
(D)   none of the above
Answer:    (B)
104.   The variable declared outside a function is called a global variable.
(A)   TRUE
(B)   FALSE
Answer:    (A)
105.   read the following statement and find the output T1=(((('x',5),'y','z'),'w',6),'u',7) print=len(T1)
(A)   8
(B)   3
(C)   4
(D)   none of above
Answer:    (B)
106.   creating individual values from a tuple's element is called________
(A)   collection
(B)   unpacking
(C)   packing
(D)   none of above
Answer:    (B)
107.   range() is used to specify the length of for-in loop
(A)   TRUE
(B)   FALSE
Answer:    (A)
108.   by using _______ function you can check the value of a variable
(A)   id()
(B)   type()
(C)   print()
(D)   all of above
Answer:    (C)
109.   which of the following are the component(s) of a variable
(A)   id
(B)   value
(C)   type
(D)   all of above
Answer:    (D)
110.   in a nested loop, a break statement terminates alll the nested loop
(A)   TRUE
(B)   FALSE
Answer:    (B)
111.   the __________ statement in python is used when a statement is required syntactically but you don’t want any command or code to execute
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (A)
112.   the _______ statement is opposite of break statement, instead of teminating the loop, it forces to execute the next iteration of the loop
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (C)
113.   the __________ statement is used to terminate the lhe loop or the statement in which it is present
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (B)
114.   what will be the output of the given statement, if you will enter 9 7 a,b=int(input("Enter a number")),int(input("Enter a number")) print (a,b)
(A)   9 7
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
115.   what will be the output of the given statement, if you will enter 9 a=b=int(input("Enter a number")) print(a,b)
(A)   9 9
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
116.   ___________ conversions is user defined conversion that forces and expression to be of specific type
(A)   implicit
(B)   explicit
(C)   both a and b
(D)   none of the above
Answer:    (B)
117.   the variable pointing toa value of a certain type of certain type can be made to point to a value of a different type. This is called _____
(A)   Type casting
(B)   static typing
(C)   dynamic typing
(D)   none of the above
Answer:    (C)
118.   which of the following is not a valid identifier
(A)   Myfile
(B)   IF
(C)   file_13
(D)   29_file
Answer:    (B)
119.   which of the following is not a token
(A)   keywords
(B)   operators
(C)   punctuators
(D)   comments
Answer:    (A)
120.   find the output of the following code:
(A)   9,none
(B)   9,9
(C)   none,none
(D)   none of the above
Answer:    (A)
121.   In python, parameters and argumentsbare the same thing.
(A)   TRUE
(B)   FALSE
Answer:    (B)
122.   A function is said to be ..........if it calls itself.
(A)   built function
(B)   pre define function
(C)   recursive
(D)   all
Answer:    (C)
123.   ........is the biank space in the beginning of a statement within a block.
(A)   indentation
(B)   space
(C)   body
(D)   none of the above
Answer:    (A)
124.   A local variable having the same name as global variable
(A)   TRUE
(B)   False
Answer:    (A)
125.   A .........is basically a block of code that will execute only when it is called.
(A)   function
(B)   sub program
(C)   block
(D)   all
Answer:    (A)
126.   In python function can be return be only one value.
(A)   TRUE
(B)   False
Answer:    (B)
127.   The .......... of a variable is the area of the program where it may be referenced
(A)   external
(B)   global
(C)   scope
(D)   local
Answer:    (C)
128.   function header and function definition is the same thing
(A)   True
(B)   False
Answer:    (B)
129.   The variable declared inside the function is called a ..........variable
(A)   global
(B)   local
(C)   external
(D)   none of the above
Answer:    (B)
130.   Actual parameter are the parameters specified within a pair of parenthesis in the function definition
(A)   True
(B)   false
Answer:    (B)
131.   You can call a function only once after defining it.
(A)   True
(B)   false
Answer:    (B)
132.   what will be the output of the given statement .board="CBSE" print(board[-1::1])
(A)   CBSE
(B)   ESBC
(C)   Generate Error
(D)   None of the above
Answer:    (A)
133.   what Wii be the output of the given statement. print("Study Trigger 2021".lower().count("t"))
(A)   2
(B)   1
(C)   Generate Error
(D)   None of the above
Answer:    (B)
134.   lower() and islower() are the same method in string.
(A)   True
(B)   False
Answer:    (A)
135.   ------ function is used to remove all the White spaces from the beginning of the string
(A)   remove()
(B)   ltrim()
(C)   rtrim()
(D)   isspace()
Answer:    (B)
136.   --------function is used to check whether all letters of the string are in capital or not
(A)   capitalize()
(B)   upper()
(C)   isupper()
(D)   toupper()
Answer:    (C)
137.   which function is used to check whether the string conatains a digit or not
(A)   digit()
(B)   todigit()
(C)   isdigit()
(D)   none of the above
Answer:    (C)
138.   how many times the word"Study" printed in the following code:word="CBSE 2021" for alpha in word[3:9]:print('Study's)
(A)   7 times
(B)   5 times
(C)   6 times
(D)   Generate Error in for loop
Answer:    (C)
139.   what will be the output of the given statement print("Study Trigger 2021"[6:14])
(A)   Study
(B)   Trigger
(C)   Generate Error
(D)   None of the above
Answer:    (B)
140.   what will be the output of the given statement print("Study":[1])
(A)   Study
(B)   S
(C)   t
(D)   Generate Error
Answer:    (C)
141.   strings are immutable .i.e you cannot change the individual letters of a string in place by assignment
(A)   TRUE
(B)   FALSE
Answer:    (A)
142.   if "name" is a string and "i" is index of that string. then name[:i]+name[i:] will return the complete string "name"
(A)   True
(B)   False
Answer:    (A)
143.   The extraction of substring from string is called
(A)   Substring
(B)   String
(C)   Slicing
(D)   None of the above
Answer:    (C)
144.   The opposite of ord()is
(A)   chr()
(B)   dro()
(C)   char()
(D)   str()
Answer:    (A)
145.   "Study" in "Study Trigger "will return
(A)   TRUE
(B)   FALSE
Answer:    (B)
146.   Which of the following is not a membership operators
(A)   >
(B)   not in
(C)   in
(D)   all of the above
Answer:    (A)
147.   print("Study"*3) //statement 1.print(3*"Study") //statement 2.both the above statement produce the same result
(A)   TRUE
(B)   FALSE
Answer:    (A)
148.   what will be the output of given statement. print("Study"+5)
(A)   StudyStudyStudyStudyStudy
(B)   Study5
(C)   Generate Error
(D)   None of the above
Answer:    (C)
149.   print(("Study"+"Trigger"+"2021")*3) //statement 1. print("Study"+"Trigger"+"2021"*3) //statement 2.Both the above statement produce same result
(A)   TRUE
(B)   FALSE
Answer:    (B)
150.   Which of the following is not a basic string operator
(A)   plus sign(+)
(B)   *
(C)   in
(D)   all of the above
Answer:    (C)
151.   string index is Bi-Direction
(A)   TRUE
(B)   FALSE
Answer:    (A)
152.   A ----------- is a sequence of characters
(A)   Numeric
(B)   Decimal
(C)   String
(D)   None of the above
Answer:    (C)
153.   if you want to communicate between functions i.e callinf and called statement then you should use
(A)   value
(B)   return
(C)   arguement
(D)   none of above
Answer:    (C)
154.   these are predrfined functions that arw always available for use. For using them we dont need to import any module
(A)   built function
(B)   pre defined function
(C)   user defined
(D)   none of above
Answer:    (A)
155.   python passes parameter by value
(A)   TRUE
(B)   FALSE
Answer:    (A)
156.   a function in python is a waste without calling it
(A)   TRUE
(B)   FALSE
Answer:    (A)
157.   Value returning function should be called from inside expression
(A)   TRUE
(B)   FALSE
Answer:    (A)
158.   The syntax of function call and declaration is very similar, except that the keyword - - - - and - - - -are missing.
(A)   colon, def
(B)   argument, def
(C)   def, parameters
(D)   none
Answer:    (A)
159.   These are Predefined functions that are available in a midule. For using them we need to import module.
(A)   built function
(B)   pre define function
(C)   user-defined
(D)   function define in module
Answer:    (D)
160.   Every Functions return a value if function do not explicity return a value,then it will return - - - - - -
(A)   return
(B)   None
(C)   value
(D)   all
Answer:    (B)
161.   Python passes arguments to function by - - - -
(A)   reference
(B)   value
(C)   both
(D)   none of the above
Answer:    (B)
162.   Functions provide a - - - - -mechanism.The same function can be called any number of times.
(A)   call
(B)   reuse
(C)   define
(D)   none of the above
Answer:    (B)
163.   The variable declared outside a function is called a global variable.
(A)   TRUE
(B)   FALSE
Answer:    (A)
164.   read the following statement and find the output T1=(((('x',5),'y','z'),'w',6),'u',7) print=len(T1)
(A)   8
(B)   3
(C)   4
(D)   none of above
Answer:    (B)
165.   creating individual values from a tuple's element is called________
(A)   collection
(B)   unpacking
(C)   packing
(D)   none of above
Answer:    (B)
166.   range() is used to specify the length of for-in loop
(A)   TRUE
(B)   FALSE
Answer:    (A)
167.   by using _______ function you can check the value of a variable
(A)   id()
(B)   type()
(C)   print()
(D)   all of above
Answer:    (C)
168.   which of the following are the component(s) of a variable
(A)   id
(B)   value
(C)   type
(D)   all of above
Answer:    (D)
169.   in a nested loop, a break statement terminates alll the nested loop
(A)   TRUE
(B)   FALSE
Answer:    (B)
170.   the __________ statement in python is used when a statement is required syntactically but you don’t want any command or code to execute
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (A)
171.   the _______ statement is opposite of break statement, instead of teminating the loop, it forces to execute the next iteration of the loop
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (C)
172.   the __________ statement is used to terminate the lhe loop or the statement in which it is present
(A)   pass
(B)   break
(C)   continue
(D)   all of above
Answer:    (B)
173.   what will be the output of the given statement, if you will enter 9 7 a,b=int(input("Enter a number")),int(input("Enter a number")) print (a,b)
(A)   9 7
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
174.   what will be the output of the given statement, if you will enter 9 a=b=int(input("Enter a number")) print(a,b)
(A)   9 9
(B)   9 0
(C)   generate error
(D)   none of above
Answer:    (A)
175.   ___________ conversions is user defined conversion that forces and expression to be of specific type
(A)   implicit
(B)   explicit
(C)   both a and b
(D)   none of the above
Answer:    (B)
176.   the variable pointing toa value of a certain type of certain type can be made to point to a value of a different type. This is called _____
(A)   Type casting
(B)   static typing
(C)   dynamic typing
(D)   none of the above
Answer:    (C)
177.   which of the following is not a valid identifier
(A)   Myfile
(B)   IF
(C)   file_13
(D)   29_file
Answer:    (B)
178.   which of the following is not a token
(A)   keywords
(B)   operators
(C)   punctuators
(D)   comments
Answer:    (A)
179.   find the output of the following code:
(A)   9,none
(B)   9,9
(C)   none,none
(D)   none of the above
Answer:    (A)
180.   In python, parameters and argumentsbare the same thing.
(A)   TRUE
(B)   FALSE
Answer:    (B)
181.   A function is said to be ..........if it calls itself.
(A)   built function
(B)   pre define function
(C)   recursive
(D)   all
Answer:    (C)
182.   ........is the biank space in the beginning of a statement within a block.
(A)   indentation
(B)   space
(C)   body
(D)   none of the above
Answer:    (A)
183.   A local variable having the same name as global variable
(A)   TRUE
(B)   False
Answer:    (A)
184.   A .........is basically a block of code that will execute only when it is called.
(A)   function
(B)   sub program
(C)   block
(D)   all
Answer:    (A)
185.   In python function can be return be only one value.
(A)   TRUE
(B)   False
Answer:    (B)