NEW
Font size
WorksheetsQuiz 1 Internship
Total questions: 15
Worksheet time: 8mins
Python is named after
Monty Bonty
Monty Python
Richard Python
Guido Van Russum
Python uses
compiler
Interpreter
Both
None
Which of the following are not data types
Float
LIST
String
Boolean
x="BNMIT"
print(x[2::-1])
TIM
MIT
MNB
BNM
What do we use to define a block of code in Python language?
Key
Bracket
Indentation
All
Which of the following operators is the correct option for power(ab)?
a^b
a*b
a**b
a*^b
Study the following code:
x = ['XX', 'YY']
for i in a:
i.lower()
print(a)
What will be the output of this program?
['XX', 'YY']
['xx', 'yy']
[XX, yy]
None
Study the following function:
import math
abs(math.sqrt(36))
What will be the output of this code?
Error
-6
6
6.0
Study the following function:
any([5>8, 6>3, 3>1])
What will be the output of this code?
False
Invalid
True
None
What will be the datatype of the var in the below code snippet?
var = 10 print(type(var))
var = "Hello"
print(type(var))
str and int
int and int
int and str
str and str
What will be the output of the following code snippet?
a = [1, 2, 3]
a = tuple(a)
a[0] = 2 print(a)
[2,2,3]
error
(2,2,3)
{1,2,3}
What will be the output of the following code snippet?
def func():
global value
value = "Local"
value = "Global"
func()
print(value)
Local
Global
Local-Global
value
What will be the output of the following code snippet?
example = ["Sunday", "Monday", "Tuesday", "Wednesday"];
print(example[-3:-1])
['Monday','Tuesday']
['Wednesday','Tuesday']
['Sunday','Tuesday']
['Monday','Sunday']
What will be the output of the following code snippet?
a = [1, 2]
print(a * 3)
ALL
[1,2]
[1,2,1,2,1,2]
[1,2,1,2]
Are Nested If loops allowed in functions?
Yes
No
Probably No
May be
