Python/Python MCQS - Data type in python Sample Test,Sample questions

Question:
Empty list in python is made by ?

1.l=[]

2.l=list()

3.Both of the above

4.None of the above


Question:
How we can convert the given list into the set ?

1.list.set()

2.set.list()

3.set(list)

4.None of the above


Question:
If we change one data type to another, then it is called

1.Type conversion

2.Type casting

3.Both of the above

4.None of the above


Question:
If we try to access the item outside the list index, then what type of error it may give ?

1.List is not defined

2.List index out of range

3.List index out of bound

4.No error


Question:
In which data type, indexing is not valid ?

1.list

2.string

3.dictionary

4.None of the above


Question:
In which of the following data type, duplicate items are not allowed ?

1.list

2.set

3.dictionary

4.None of the above


Question:
l=[1,2,3,4,8,1.2], which type of data type is this ?

1.set

2.list

3.tuple

4.integer


Question:
l=[1,2,3,4],
then l[3] is ?

1.1

2.2

3.3

4.4


Question:
l=[1,2,3,4], then l[-2] is ?

1.1

2.2

3.3

4.4


Question:
l=[9,3,7,6,1,2,0], then l[100] is

1.2

2.9

3.6

4.Error


Question:
What is list data type in Python ?

1.collection of integer number

2.collection of string

3.collection of same data type

4.collection of different data type


Question:
What is type casting in python ?

1.declaration of data type

2.destroy data type

3.Change data type property

4.None of the above


Question:
Which of the following can convert the string to float number ?

1.str(float,x)

2.float(str,int)

3.int(float(str))

4.float(str)


Question:
which of the following function are used to convert the string into the list ?

1.map()

2.convertor()

3.split()

4.lambda


Question:
Which of the following is not the data type in python ?

1.List

2.Tuple

3.Set

4.Class


Question:
Which of the following is the data type possible in python?

1.int

2.list

3.dictionary

4.All of the above


Question:
Which of the following is the example of the type casting ?

1.int(2)

2.str(2)

3.str(list)

4.All of the above


Question:
Which of the following is the list in python ?

1.l=[]

2.l=list()

3.l=[1,2,3]

4.All


Question:
Which of the sequence are valid in the set data type in python ?

1.1,1,1,1,1,1

2.2,3,4,5,6,1,2

3.1,2,3,4,5,6

4.None of the above


Question:
x=3.123, then int(x) will give

1.3.1

2.0

3.1

4.3


More MCQS

  1. Python MCQS - Function
  2. Python MCQS - GUI in python
  3. Python MCQS - Operators
  4. Python MCQS - Data type in python
  5. Python MCQS - loops in python
  6. Python MCQS - Numpy
  7. Python MCQS - sqlite3
  8. Python MCQS - Library
  9. Python MCQS - Pandas
  10. Python MCQs
  11. Dictionary Python MCQ set 1
  12. Dictionary Python MCQ set 2
  13. MCQ For Python Fundamentals
  14. MCQ Introduction to Python Section 1
  15. MCQ Introduction to Python Section 2
  16. MCQ Introduction to Python Section 3
  17. MCQ on Flow of Control in Python Set 1
  18. MCQ on Flow of Control in Python Set 2
  19. MCQ on Python String Set 1
  20. File Handling in Python section 1
  21. File Handling in Python section 2
  22. Python Functions MCQS Set 1
  23. Python Functions MCQS Set 2
  24. MCQ on List in Python
  25. Pandas MCQ Questions Set 1
  26. Pandas MCQ Questions Set 2
  27. Tuple MCQ in Python
  28. Python dataframe MCQ
  29. Python Mcq Set 1
  30. Python Mcq Set 2
  31. Python Mcq Set 3
  32. Python Mcq Set 4
  33. Python Mcq Set 5
  34. Python Mcq Set 6
  35. Python Mcq Set 7
  36. Python Mcq Set 8
  37. Python Mcq Set 9
  38. Python Mcq Set 10
  39. Python Mcq Set 11
  40. Python Mcq Set 12
  41. Python Mcq Set 13
  42. Python Mcq Set 14
  43. Python Mcq Set 15
  44. Python Mcq Set 16
  45. Python Mcq Set 17
  46. Python Mcq Set 18
  47. Python Mcq Set 19
  48. Python Mcq Set 20
  49. Python Mcq Set 21
  50. Python MCQ
  51. Python MCQ Questions with Answer
  52. Python Practice Papers
  53. python mcq question and answer
  54. Test
Learn Python MCQS - Data type in python,Learn Python Objetive choice questions and answers,Python Multiple choice questions and answers,Python objective, Python questions , Python answers,Python MCQs questions and answer
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!