Python
Which of the following is not a keyword in Python?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
include
Answer option 2
pass
Answer option 3
lambda
English
Which method can be used to remove any whitespace from both the beginning and the end of a string?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
strip()
Answer option 2
trim()
Answer option 3
cut()
Reference Link
English
How do you insert COMMENTS in Python code?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
# This is a comment
Answer option 2
// This is a comment
Answer option 3
<!-- This is a comment -->
English
Which of the following is a correct way to create a complex number?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
complex(1, 2)
Answer option 2
1 + 2i
Answer option 3
complex(1, 2i)
Reference Link
English
Which of the following is a correct way to create a byte object?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
b'Python'
Answer option 2
bytes('Python')
Answer option 3
byte('Python')
English
Which of the following is a correct way to create a frozen set?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
frozenset([1, 2, 3])
Answer option 2
frozen([1, 2, 3])
Answer option 3
set([1, 2, 3])
Reference Link
English
Which of the following is a correct way to create a list with elements?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
[1, 2, 3]
Answer option 2
(1, 2, 3)
Answer option 3
{1, 2, 3}
English
Which of the following is a correct way to create a set comprehension?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
{x for x in range(5)}
Answer option 2
[x for x in range(5)]
Answer option 3
(x for x in range(5))
Reference Link
English
What is the output of print(5 >= 10)?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
False
Answer option 2
True
Answer option 3
None
English
Which of the following is a correct way to create a dictionary comprehension?
Anonymous (not verified)
Subject
Correct answer position
1
Answer option 1
{x: x**2 for x in range(5)}
Answer option 2
[x: x**2 for x in range(5)]
Answer option 3
(x: x**2 for x in range(5))
English