my_list = [1, 2, 3, 4] print(my_list[1:3]) A. [2, 3] B. [1, 2, 3] C. [3, 4] D. [1, 3, 4] AnswerOption: A
Read More »Python
|
Which of the following methods adds an element to the end of a list?
A. append() B. insert() C. add() D. extend() AnswerOption: A
Read More »What is the correct syntax to create a list in Python?
A. list = (1, 2, 3) B. list = [1, 2, 3] C. list = {1, 2, 3} D. list = AnswerOption: B
Read More »Which of the following data types is mutable in Python?
A. int B. list C. str D. tuple AnswerOption: B
Read More »What is the output of the following code?
print(2 ** 3) A. 6 B. 9 C. 8 D. 16 AnswerOption: C
Read More »Which function is used to find the length of a string in Python?
A. strlen() B. length() C. len() D. count() AnswerOption: C
Read More »Which of the following is the correct way to import the math module?
A. import mathlib B. import mathematics C. import math D. import MathModule AnswerOption: C
Read More »Which of the following is not a keyword in Python?
A. True B. False C. None D. value AnswerOption: D
Read More »What is the output of the following code?
print(“Hello, World”[::-1]) A. dlroW ,olleH B. Hello, World C. d D. Error AnswerOption: A
Read More »Which of the following is used to create a comment in Python?
A. // This is a comment B. # This is a comment C. /* This is a comment */ D. <!– This is a comment –> AnswerOption: B
Read More »What is the output of the following code?
print(type(10)) A. <class ‘float’> B. <class ‘int’> C. <class ‘string’> D. <class ‘complex’> AnswerOption: B
Read More »Which of the following is a valid variable name in Python?
A. 1_variable B. _variable C. variable! D. variable-1 AnswerOption: B
Read More »Amongst which of the following is / are the Numeric Types of Data Types?
A. int B. float C. complex D. All of the mentioned above AnswerOption: D
Read More »Amongst which of the following is / are the application areas of Python programming?
A. Web Development B. Game Development C. Artificial Intelligence and Machine Learning D. All of the mentioned above AnswerOption: D
Read More »Amongst the following, who is the developer of Python programming?
A. Guido van Rossum B. Denis Ritchie C. Y.C. Khenderakar D. None of the mentioned above AnswerOption: A
Read More »
MCQs | eBooks – Textbook Solutions All types eBook are available
