- Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.03 in Python?
a) [x * 0.03 for x in range(334)]
b) [x * 0.03 for x in range(333)]
c) [x * 0.03 for x in range(0, 334)]
d) [x * 0.03 for x in range(0, 333)]
Correct Answer: a) [x * 0.03 for x in range(334)] - What is the output of
print("Python".rsplit("t", 5))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.04 in Python?
a) [x * 0.04 for x in range(251)]
b) [x * 0.04 for x in range(250)]
c) [x * 0.04 for x in range(0, 251)]
d) [x * 0.04 for x in range(0, 250)]
Correct Answer: a) [x * 0.04 for x in range(251)] - What is the output of
print("Python".split("t", 6))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.05 in Python?
a) [x * 0.05 for x in range(201)]
b) [x * 0.05 for x in range(200)]
c) [x * 0.05 for x in range(0, 201)]
d) [x * 0.05 for x in range(0, 200)]
Correct Answer: a) [x * 0.05 for x in range(201)] - What is the output of
print("Python".rsplit("t", 6))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.06 in Python?
a) [x * 0.06 for x in range(167)]
b) [x * 0.06 for x in range(166)]
c) [x * 0.06 for x in range(0, 167)]
d) [x * 0.06 for x in range(0, 166)]
Correct Answer: a) [x * 0.06 for x in range(167)] - What is the output of
print("Python".split("t", 7))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.07 in Python?
a) [x * 0.07 for x in range(143)]
b) [x * 0.07 for x in range(142)]
c) [x * 0.07 for x in range(0, 143)]
d) [x * 0.07 for x in range(0, 142)]
Correct Answer: a) [x * 0.07 for x in range(143)] - What is the output of
print("Python".rsplit("t", 7))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.08 in Python?
a) [x * 0.08 for x in range(126)]
b) [x * 0.08 for x in range(125)]
c) [x * 0.08 for x in range(0, 126)]
d) [x * 0.08 for x in range(0, 125)]
Correct Answer: a) [x * 0.08 for x in range(126)] - What is the output of
print("Python".split("t", 8))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.09 in Python?
a) [x * 0.09 for x in range(112)]
b) [x * 0.09 for x in range(111)]
c) [x * 0.09 for x in range(0, 112)]
d) [x * 0.09 for x in range(0, 111)]
Correct Answer: a) [x * 0.09 for x in range(112)] - What is the output of
print("Python".rsplit("t", 8))?
a) [‘Py’, ‘hon’]
b) [‘Pyt’, ‘hon’]
c) [‘P’, ‘ython’]
d) Error
Correct Answer: a) [‘Py’, ‘hon’] - Which of the following is used to create a list of numbers from 0 to 10 in steps of 0.1 in Python?
a) [x * 0.1 for x in range(101)]
b) [x * 0.1 for x in range(100)]
c) [x * 0.1 for x in range(0, 101)]
d) [x * 0.1 for x in range(0, 100)]
Correct Answer: a) [x * 0.1 for x in range(101)]