WorksheetsPython 2027 Batch
Total questions: 49
Worksheet time: 49mins
What is the maximum length of a Python identifier?
32
16
128
No fixed length is specified
What will be the output of the following code snippet?
print(2**3 + (5 + 6)**(1 + 1))
129
8
121
None of the above
Which of the following concepts is not a part of Python?
Pointers
Loops
Dynamic Typing
All of the above
Which of the following statements are used in Exception Handling in Python?
Try
Except
Finally
All of the above
Which of the following types of loops are not supported in Python?
For
While
Do-While
None of the above
Which of the following is the proper syntax to check if a particular element is present in a list?
If ele in list
If not ele not in list
Both A and B
None of the above
Which of the following functions converts date to corresponding time in Python?
strptime ( )
strftime ( )
Both A and B
None of the above
An exception is:
an object
a special function
a standard module
an object
Which of the following is false about protected class members?
They begin with one underscore
They can be accessed by subclasses
They can be accessed by name mangling method
They can be accessed within a class
Overriding means changing behaviour of methods of derived class methods in the base class. Is the statement true or false?
True
False
None
May be
What is the output of the following code, if the time module has already been imported?
4 + '3'
NameError
IndexError
ValueError
TypeError
The output of the code shown below is:
int("gprec")
ImportError
ValueError
TypeError
NameError
Can one block of except statements handle multiple exception?
yes
no
yes, like except TypeError, SyntaxError [,…].
yes, like except [TypeError, SyntaxError].
Which of the following function used to create window in
python tkinter.
window()
tk()
toolkit()
wd()
Which of the following attribute used to change the text
color of a Label widget in python tkinter
fg
foreground
bg
background
Which function is used to set the size of the tkinter
window?
setsize()
size()
geometry()
dimension()
What is the use of mainloop() function in tkinter window?
To create the window screen
To hold the window screen
To delete the window screen
To disable the window screen
In MVC pattern, the model is responsible for
processing the program's data
managing the program's data
displaying the program's data
control the appearance of data
Which is not a meta character
*
%
/
\
functions that belongs to regular expression module
findall
match
search
All the above
[^pqr] returns a
Match for characters p, q, r, P, Q and R only
Match for characters p, q, and r only
Match for any character contain p, q, and r
Match for any character except p, q, and r
Which returns a match for any alphabetic lower or upper case character between a and z.
[a-z]
[a-z-A-Z]
[a-z][A-Z]
[azAZ]
What is the output of the below python program
import re
str = "now a days techies are available in different technologies"
Myvar = re.findall("tech", str)
print(Myvar)
['tech'], ['tech']
['tech'][2]
[2]['tech']
['tech', 'tech']
re.purge() is used to
Search for exact match
Clear the cache
Split the string
search for numbers
When will the else part of try-except-else be executed?
always
when an exception occurs
when no exception occurs
never
A word that tells more about verbs, verb phrases is known as
Adjective
Adverb
Pronoun
Verb
Which type of adverb shows or tells you how or in what way an action is done?
Adverb of Place
Adverb of Manner
Adverb of Time
Adverb of Frequency
Which adverb tells or shows you WHEN an action took place?
Adverb of Manner
Adverb of Place
Adverb of Frequency
Adverb of Time
"I came early this morning". Which type of adverb is this?
Manner
Time
Frequency
Degree
Which sentence is an example of Adverb of Frequency?
Mary is very beautiful
I have already seen this movie.
I always go to work on time
It was so hot, I almost fainted
What is an adjective?
Naming words
Action words
Describing words
Doing words
In the following mark the types of adjectives
Demonstrative
Compound
Interrogative
Possessive
Quantitative
What the three forms of Adjective
Positive, Negative, Neutral
Positive, Subtractive, Multiplicative
Present, Past, Future
Positive, Comparative, Superlative
What are Special Adjectives?
Adjectives having special meaning
Adjectives having two possible forms of comparison
Adjectives having one possible comparison
Adjectives having NO possible comparison
What is the comparative of Difficult
Most Difficult
Difficulter
Difficultest
More Difficult
What is the superlative of Bad?
Better
Best
Worse
Worst
what is the comparative and superlative of Clever?
Cleverer & Cleverest
Clevers & Cleveress
More Clever & Most Clever
More Cleverer & Most Cleverest
Which one of these are Irregular Adjectives?
Difficult
Beautiful
Much
Polite
Adjectives answers to which type of questions?
When? How? What?
Which? Where? Whom?
What Kind? Which one? How Many?
Whose this? How to? When to?
How many students in your class come from Korea?
came
come
comes
are coming
Enter Your Name
Enter Your Enrolment No
Enter Your Branch(CSE, CSE-AIML, CSE-DS, CSIT, IT, CY)
Enter Your Acropolis Email ID
