0% found this document useful (0 votes)
24 views

Week-1 MCQ - Pages

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Week-1 MCQ - Pages

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

WEEK-1 MCQ

1. In python, a block of code is defined by using _________________

Indentation
{}
()
Begin; end;

2. In python, which of the following quotes used to represent string


literals ?

Single
Double
Triple
All of the above

3. Which of the following operator helps to find a value or a variable


in the specified sequence of string such as list, tuple, dictionary.

Identity Operator
Membership Operator
Assignment Operator
Arithmetic Operator
4. Which of the following technique is used to evaluate the expression
if it is having more than one operator ?

Operator Precedence
Identity
Membership
Bitwise

5. In this statement 5+6=11, 5 and 6 refers to ____________

Operand
Operator
Expression
Numbers

6. ‘<=‘ and ‘>=‘ operators are __________ type of operator

Arithmetic
Relational
Bitwise
Logical
7. The output can be displayed using which of the following
function ?

Input()
Print()
Put()
Get()

8. The python supports comment line using __________ symbol

$ Symbol
@ Symbol
# Symbol
! Symbol

9. Which of the following term is related to Tuple Assignment ?

Packing
Unpacking
Single Assignment
All of the above
10. Tuple packing / unpacking technique helps to avoid __________
variable

Temporary
Lengthy
Storage
None

11. Python is a ____________ based language

Compiler
Intepreter & Compiler
Interpreter
All of the above

12. Interpreter translate __________ at a time.

Whole program
Three line
Two line
One line
13. Who developed the python language ?

Zim Den
Guido Van Rossum
Nine Stom
Wick Van Rossum

14. Python is an ______________ language

Object Oriented
Procedure Oriented
Partially Object Oriented
Function Oriented

15. In which mode, python instructions can be stored into a disk ?

Interactive mode
Script mode
Compiler mode
None of the above
16. In which mode, we can get immediate response ?

Interactive mode
Script mode
Compiler mode
None of the above

17. Why does the name of local variables start with an underscore
discouraged ?

To identify the variable


It confuses the interpreter
It indicates a private variable of a class
None of these

18. Which of the following statements is correct for variable names in


Python language ?

All variable names must begin with an underscore


Unlimited length
The variable name length is a maximum of 2
All the above

19. The accessibility of the variable is also called _________ ?

Scope of the variable


Value of the variable
Information about the variable
None of these

20. The accessibility of global variable is _____________

Anywhere in the program


Within the function
Within the class
None of the above

21. Which line of code produces an error?

" one" +"2"


'5' + 6
3+4
"7" + 'eight'

22. What is the output of this code?


>>>int ("30" + "40")

"70"
3040
("30" + "40")
"3040"

23. A variable can be removed using which keyword?

del
clear
delete
remove

24. Identify the correct variable name


%name="xyz"
ThisBook="Python"
123abc=10.22
this_is_a_variable=7
25. The input() function takes user's input as a

string
character
float
integer

26. Comments start with which symbol?


#
"
*
//

27. Which one of the following is the correct extension of the Python file?
.PyPI
.py
.python
.p

28. Bitwise operator can be applied on which data type?


character
float
integer
string

You might also like