Introduction to python-Unit1-Quiz

Introduction to Python (IP)

Quiz

Unit-1:-

  1. Python was created by (    )
  1. Dennis Ritche
  2. James Gosling
  3. Guido van Rossum
  4. Bjarne Stroustrup.

 

  1. Find the output of the following python program (      )

x = 5

print (type(x))

 

  1. <class int>
  2. <class float>
  3. <class str>
  4. None of the above.

 

 

  1. What is the output of the following python program ( )

Str = “HelloWorld!”

Print(len(Str))

  1. 10
  2. 12
  3. 15
  4. 11

 

  1. When the break statement is executed, the python interpreter ( )
  1. None of the above
  2. Continues the loop
  3. Both b and d.
  4. Jumps out of the loop.

 

  1. List the sequence data types ( )
  1. int, float, complex
  2. set, frozenset
  3. list, tuple ,range
  4. bool

 

  1. What is the output of the following python program is ( )

 

  1. python is portable, python is easy to use.
  2. Python is easy to use, python is portable.
  3. python is portable.
  4. None of the above.

 

  1. Find the output of the following python program ( )

x = [“apple”, “banana”]

print(“banana” in x)

  1. 0
  2. 1
  3. True
  4. False

 

  1. Find the output of the following python program ( )

print (10 & 3) (      ) 1M.

  1. 2
  2. 4
  3. -1
  4. None of the above.
  1. Evaluate the following expression ( )

print(4/2*4+3+2**3-2)

  1. 22
  2. 17
  3. 625
  4. None of the above.

 

  1. Find the output of the following python program ( )

  1. 0
  2. Zaheer khan
  3. Saurav Ganguly
  4. 10
  1. What is the output of the following program(   )

  1. John
  2. Jack
  3. Black
  4. displays an error message

12.What is the output of the following program(    )

 

  1. orange,banana,cherry
  2. orange,cherry,banana
  3. banana,cherry,orange
  4. displays an error message

13.What is the output of the following program(    )

  1. orange,banana,cherry
  2. apple,cherry,banana
  3. apple,banana,cherry
  4. displays an error message

14.What is the output of the following program(     )

  1. python is language
  2. python is programming language
  3. C is programming language
  4. Java is programming language
  1. What is the output of the following program(     )

  1. python is language
  2. python is high level language
  3. C is programming language
  4. python is portable

16.What is the output of the following program(      )

  1. python is language
  2. python is high level language
  3. C is programming language
  4. python is portable

17.What is the output of the following program(     )

  1. python
  2. Java
  3. None of the above
  4. python

Python

python

18.What is the output of the following program(      )

  1. Java
  2. python
  3. c
  4. Java

Java

19.A variable inside a function can be converted into global variable by using the keyword—–

  1. Local
  2. Constant
  3. global
  4. int

20.The data types of the following variables are(        )

  1. Complex,string,list,set
  2. List,set,string,complex
  3. List,string,complex,set
  4. Set,list,string,complex.

21.What is the output of the following program(      )\

  1. Python,True,False,Java
  2. python,True,False,Java
  3. True,False,python,Java
  4. False,True,Java,python.
  1. What is the output of the following program(     )

  1. 10,20,0,15,40
  2. 10,20,0,20,40
  3. 10,20,0,40,15
  4. 20,15,10,0,40.
  1. Fill up the blanks, The difference is that bytes array ————-be modified but the bytearray type array ———-modified.
  1. can be, can be
  2. can be, cannot be
  3. cannot be, can be
  4. cannot be, cannot be
  1. The difference between a list and an array is that a list can store ——————of elements but an array can store only —————-of elements.
  1. different types, one type
  2. one type, different types
  3. different types, different types
  4. one type, one type.

 

  1. What is the output of the following program(    )

  1. 20,20,55.5
  2. 10,20,55.5
  3. 10,20,55.5,mango
  4. 20,55.5,mango

26.What is the output of the following program(     )

  1. 30 32  36  38
  2. 30 32 36  38  40
  3. 32 36  38  40
  4. 32 36 38

27.What is the output of the following program(     )

  1. larger is:5
  2. larger is:10
  3. larger is:0
  4. larger is:50

28.What is the output of the following program(     )

  1. 1,2,3,4,5,
  2. 2,3,4,5,6,
  3. 1,2,3,4,5,6,
  4. 1,2,3,4,

29.What is the output of the following program(      )

  1. m,a,n,g,o
  2. t,a,n,g,o
  3. a,n,g,o,m
  4. a,n,g,o
  1. The syntaxes of return and assert statements are(      )
  1. return expression, assert expression
  2. return expression, assert message
  3. return expression, assert expression,message
  4. return message, assert message

31.When ‘break’ is executed, the python interpreter ————-and When ‘continue’ is executed, the —————will start.

  1. Next repetition, jumps out of loop
  2. jumps out of loop, Next repetition
  3. jumps out of loop, jumps out of loop
  4. Next repetition, Next repetition

32.What is the output of the following program(      )

  1. mango,life
  2. apple,life
  3. life,mango
  4. life,apple

33.What is the output of the following program(     )

  1. 10,9,8,7,
  2. 10 9 8 7
  3. 10*9*8*7*
  4. 10$9$8$7$

34.What is the output of the following program(     )

  1. X,i,o,a,m,i,
  2. X.i.o.a.m.i.
  3. X$i$o$a$m$i$
  4. X*i*o*a*m*i*

35.State True or False ,The syntax of while loop is:

  1. True
  2. False

 

 

 

 

 

 

 

error: Content is protected !!