Question: What is the output of the following code?
Code: s = {1, 2, 3}
s.add([4, 5])
Options:
1. {1, 2, 3, [4, 5]}
2. TypeError
3. {1, 2, 3, 4, 5}
4. {1, 2, 3}
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/SAsmbdXmz6
Question: What will be the output of the following Python code?
Code: x = 'abcd'
for i in x:
print(i)
x.upper()
Options:
1. a B C D
2. a b c d
3. A B C D
4. error
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/p2mYQObDGw
Question: What will be the output of the following Python code?
Code: x = 'abcd'
for i in x:
print(i)
x.upper()
Options:
1. a B C D
2. a b c d
3. A B C D
4. error
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/p2mYQOcbw4
Question: what will be the output of the following python code?
Code: x = [[0], [1]]
print((' '.join(list(map(str, x))),))
Options:
1. 01
2. [0] [1]
3. (‘[0] [1]’,)
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/fOhClTXHRh
Question: Which of the following is a core datatype?
Code:
Options:
1. class
2. list
3. dictionary
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/6TkwSyOKxh
Question: Python supports the creation of anonymous functions at runtime, using a construct called
Code:
Options:
1. pi
2. anonymous
3. lambda
4. none of the mentioned
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/x0KUJzYh2H
Question: Python supports the creation of anonymous functions at runtime, using a construct called
Code:
Options:
1. pi
2. anonymous
3. lambda
4. none of the mentioned
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/x0KUJzYOSf
Question: What is the output of the following code?
Code: l1=[23,45,56,87]
l2=[34,56, 67,98]
print(l1+l2)
Options:
1. [23,45,56,87,34,56,67,98]
2. syntax error
3. [23,45,56,87]
4. [34,56,67,98]
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/ta8Rus9QXp
Question: What is the output of the following code?
Code: l1=[23,45,56,87]
l2=[34,56, 67,98]
print(l1+l2)
Options:
1. [23,45,56,87,34,56,67,98]
2. syntax error
3. [23,45,56,87]
4. [34,56,67,98]
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/ta8RusaoMX
Question: pep 8 python full form
Code:
Options:
1. Python Enhancement Proposal
2. Python Enrollment Proposal
3. Python Enrollment Purpose
4. Python Enhancement Purpose
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/EiD7Sout9M
Question: What will be the output of the below python code
Code: a = 1 if 20 < 10 else 10
print (str(a))
Options:
1. 1
2. 10
3. 1, 10
4. Error
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/djZ1jEnBzZ
Question: What os the output of the following code?
Code: a = [[]]*2
a[1].append(6)
print(a)
Options:
1. [[6], []]
2. [[6], [6]]
3. [[], [6]]
4. Syntax error
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/GxcmPZSmlp
Question: What os the output of the following code?
Code: a = [[]]*2
a[1].append(6)
print(a)
Options:
1. [[6], []]
2. [[6], [6]]
3. [[], [6]]
4. Syntax error
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/GxcmPZSUaX
Question: What will be the output of the following Python code?
Code: m = https://t.co/Qgs44Ro9l0('a', 'The blue umbrella')
https://t.co/KdZDSnxsXH.pattern
Options:
1. ‘The blue umbrella’
2. {}
3. 'a'
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/zNAuu9gc26
Question: What will be the output of the following Python function?
Code: min(max(False,-3,-4), 2,7)
Options:
1. -4
2. -3
3. 2
4. False
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/as1AMRLYgF
Question: What happens in this shift operation?
Code: print(9 >> 2 & 1)
Options:
1. 1
2. 0
3. 2
4. 3
Refer https://t.co/hdgmB6taUD to play more.
https://t.co/zl7DLEB5EC
Question: Which of the following operations is invalid?
Code: .
Options:
1. t = (1, 2) + (3, 4)
2. t = tuple(range(5)
3. t = (1, 2, [3, 4])
4. t = {1, 2, 3}
Refer https://t.co/hdgmB6sD55 to play more.
https://t.co/zxbM3TIVEp