➤ How to Code a Game
➤ Array Programs in Java
➤ Java Inline Thread Creation
➤ Java Custom Exception
➤ Hibernate vs JDBC
➤ Object Relational Mapping
➤ Check Oracle DB Size
➤ Check Oracle DB Version
➤ Generation of Computers
➤ XML Pros & Cons
➤ Git Analytics & Its Uses
➤ Top Skills for Cloud Professional
➤ How to Hire Best Candidates
➤ Scrum Master Roles & Work
➤ CyberSecurity in Python
➤ Protect from Cyber-Attack
➤ Solve App Development Challenges
➤ Top Chrome Extensions for Twitch Users
➤ Mistakes That Can Ruin Your Test Metric Program
Q1) How can we create an empty list in python?
a) null.list
b) list.null
c) list=()
d) list=[]
View Answer
Answer:- d) list=[]Q2) Which of the following is not a data type in python?
a) List
b) Tuple
c) Book
d) Dictionary
View Answer
Answer:- c) BookQ3) Select the correct example of complex data type in Python.
a) 2j
b) -50j
c) 5 + 3j
d) All of the above are correct
View Answer
Answer:- d) All of the above are correctQ4) How to copy one list to another in python?
a) l1 = l2
b) l1[] = l2
c) l1[] = l2[]
d) l1[] = l2[:]
View Answer
Answer:- d) l1[] = l2[:]Q5) What type of data is: arr = [(3,3),(4,4),(5,5),(6,6)]?
a) Array of tuples
b) List of tuples
c) Tuples of lists
d) Invalid type
View Answer
Answer:- b) List of tuplesQ6) How can we get 4 from the given list: list=[1, 2, 3, 4, 5]
a) list[-3]
b) list[3]
c) list[4]
d) None of the above
View Answer
Answer:- b) list[3]Q7) How can we get 3 from the given list: list=[1, 2, 3, 4, 5]
a) list[-3]
b) list[3]
c) list[4]
d) None of the above
View Answer
Answer:- a) list[-3]Q8) What is the output of the given below program?
x = 5.365
print(int(x));
a) 5.365
b) 5.3
c) 5
d) Error
View Answer
Answer:- c) 5Q9) Which of the following is a Correct way to declare a variable x of float data type in python?
a) x = 2.5
b) float(2.5)
c) float x = 2.5
d) All of the above
View Answer
Answer:- a) x = 2.5Q10) What is the return type of id() function?
a) list
b) int
c) double
d) bool
View Answer
Answer:- b) intQ11) What is the output of the given below program?
list=[1, 2, 3, 4, 5]
print(list[0])
a) 0
b) 1
c) 5
d) None of these
View Answer
Answer:- b) 1Also See:- Python Function MCQ