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

Posted Date:-2019-06-04 04:39:11


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

Posted Date:-2019-06-04 04:43:55


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

Posted Date:-2019-06-04 04:33:14


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

Posted Date:-2019-06-04 04:49:41


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

1.list

2.string

3.dictionary

4.None of the above

Posted Date:-2019-06-04 04:46:33


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

1.list

2.set

3.dictionary

4.None of the above

Posted Date:-2019-06-04 04:41:43


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

1.set

2.list

3.tuple

4.integer

Posted Date:-2019-06-04 04:53:01


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

1.1

2.2

3.3

4.4

Posted Date:-2019-06-04 04:47:01


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

1.1

2.2

3.3

4.4

Posted Date:-2019-06-04 04:47:55


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

1.2

2.9

3.6

4.Error

Posted Date:-2019-06-04 04:48:25


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

Posted Date:-2019-06-04 04:37:47


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

Posted Date:-2019-06-04 04:35:31


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)

Posted Date:-2019-06-04 04:50:54


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

1.map()

2.convertor()

3.split()

4.lambda

Posted Date:-2019-06-04 04:56:38


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

1.List

2.Tuple

3.Set

4.Class

Posted Date:-2019-06-04 04:32:22


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

1.int

2.list

3.dictionary

4.All of the above

Posted Date:-2019-06-04 04:31:38


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

Posted Date:-2019-06-04 04:36:39


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

1.l=[]

2.l=list()

3.l=[1,2,3]

4.All

Posted Date:-2019-06-04 04:38:27


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

Posted Date:-2019-06-04 04:40:46


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

1.3.1

2.0

3.1

4.3

Posted Date:-2019-06-04 04:51:24


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
Search
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!