Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Python is Ubiquitous? Is this true or false?

True
The 2 main versions of Python include – Python 2.x & 3.x
Python supports automatic garbage collection. True
Which of the following attributes shows the characteristics of Python? Python
is everywhere (Webscripting, 3D Modelling , Games , and Desktop applications
). Ubiquity
Which of these are salient features of Python, except? Limited platform
support
Which is the fastest implementation of Python? pyPy
Code written in Python 3 is backward compatible with Python 2. False
While using Python IDLE, by how many space are the code suites indented? 4
Which action should be avoided so that you do not mistakenly overwrite
names that you have already defined? Use the wildcard import
What command is used to output text from both the Python shell and within a
Python module? print()
When using the Python shell and code block, what triggers the interpreter to
begin evaluating block of code? blank line
Which of the following will not result in declaring x as datatype of float? X=
x=5
What is the output of bool(0)? False

Which statement correctly assigns X as an infinite number? X= float(‘inf’)

While using 'bool', all zero values are considered as false and non- zero values
are considered as true. Is this correct? True

Is x,y=5,6 a valid statement? True

The bool class is subset of ______. Int

Which datatype is represented by int in Python 3? Decimal Short

Which statement accurately defines the bool class? Boolean not returns
false….
Equivalent operation for function pow(x , y) is __. X**y

What is the output of max('Infinity')? Y

Which statement creates the bytes literal when run? bytes_literal = b'Copyright
\xc2\xa9'

The class which provides immutable sequence of elements tuple

Which statements prevent the escape sequence interpretation? r’…

bytearray provides an mutable sequence (making it modifiable) true

Which describes bytearrays? Without an argument….

Which methods can be used with list objects? Reverse, pop, clear

Byte datatype can contain only ______ and ______. Ascii and hexadecimal
characters

Empty list could be created with list() alone. False

Which of these could be used in tuple object sorted….

Values in bytearray should be integers between 0-255

Using Pop in list will remove the popped up item. True

Which statements will result in slice of tuple? a_tuple[:] a_tuple[::-1]


a_tuple[0] =[5] a_tuple[::2] a_tuple[:] a_tuple[::-1]

What is the output of min('Infinity')? F

All of these range types are correct except ___. Range(20,40,-2)

Consider b is frozen set, what happen to b.add(3)? Error…

Empty dictionary is represented as ________. {}

a.difference(b) highlights the ________. a-b

a.symmetric_difference(b) highlights the ________. a.union(b) - a.intersection(b)

Dictionary could be copied to another dictionary using which of following


syntax? dict_a=dict_b.copy()
a = 0 if a: print("a's value") else: print("Sorry nothing will get printed") Sorry
nothing….

What is the output of the following code count = 0 while count < 2: print
(count, " is less than 2") count = count + 2 else: print (count, " is not less than
2") 0 is less than 2; 2 is not less than 2

What is the output of below code snippet - for char in 'Welcome': print (char,
end='*') print() W*e*l*c*o*m*e*

What is the output of the following code? for x in (1,10,100): print (x) 1 10 100
What is the output of bool(5) ? False

What characteristics describe the python programming language ? Interpreted


and compiled

What is the output of - list_pt = list('Welcome') print(list_pt) ['W', 'e', 'l', 'c', 'o', 'm', 'e']

You might also like