Python Test 3

More Python Tests

Question 1: Scientific notation for float number 0.0004567 is ________.

Question 2: What will be the output of the following code?

s1={3,4,5,6}
s2={4,5,6,7}
print(s1&s2)

Question 3: What is the output of the following code?

>>> a='Hello '
>>> b='World'
>>> a+b

Question 4: What will be the output of the following code?

a=5
b=10
a, b = b, a
print(a, b)

Question 5: What is the value of the following arithmetic expression 5*4**2?

Question 6: Which of the following are valid complex number objects?

Question 7: A list can contain _________ elements.

Question 8: If ['one', 'four', 'three', 'two'] is a list object, the sort() function will return:

Question 9: What will be the output of the following code?

x = [x for x in range(10) if x<5] print(x)

Question 10: What will be the output of the following code?

lst = [1, 2, 3, 4, 5]
del lst[:]
print(lst)

Question 11: What will be output of the following expression:

n= max('ten', 10, 10.00)
Print(n)

Question 12: What will be the output of the following code?

names = ('Jeff', 'Bill', 'Steve', 'Yash') 
a, b, c, d = names 
print("Hello", a)

Question 13: Which of the following methods cannot be used with tuple?

Question 14: Which of the following statements is true?

Question 15: To delete a key value pair in dictionary, use