➤ 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) Which statement is correct?
a) List is immutable && Tuple is mutable
b) List is mutable && Tuple is immutable
c) Both are Mutable.
d) Both are Immutable
View Answer
Answer:- b) List is mutable && Tuple is immutableQ2) Which of the following is the example of typecasting?
a) int(3)
b) str(3)
c) str(abc)
d) All of the above
View Answer
Answer:- d) All of the aboveQ3) What is the data type of print (type(10)) in python?
a) int
b) float
c) integer
View Answer
Answer:- a) intQ4) What is the data type of print(type(0xEE)) in python?
a) int
b) hexint
c) hex
d) number
View Answer
Answer:- a) intQ5) What is the result of print(type([]) is list).
a) True
b) False
View Answer
Answer:- a) TrueQ6) l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?
a) set
b) tupl
c) list
d) None of these
View Answer
Answer:- c) listQ7) Which one of the following is a mutable data type?
a) set
b) tupl
c) int
d) str
View Answer
Answer:- a) setQ8) Which one of the following is an immutable data type?
a) set
b) tupl
c) int
d) str
View Answer
Answer:- c) intQ9) In which data type, indexing is not valid?
a) Dictionary
b) String
c) List
d) None of the above
View Answer
Answer:- c) ListQ10) Suppose a list with name arr, contains 3 elements. You can get the 2nd element from the list using:
a) arr[-1]
b) arr[1]
c) arr[2]
d) arr[-2]
View Answer
Answer:- b) arr[1]Q11) Suppose we have a list with name arr, contains 3 elements. How to get the last element of a list in python?
a) arr[0]
b) arr[3]
c) arr[-1]
d) arr[last]
View Answer
Answer:- c) arr[-1]Also See:- MCQ on Data Types in Python– 2