ANS WER KEY Xii Cs MCQ 15 June 2022

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

SESSION: 2022 - 23

SHORT - REVISION TEST -01


TOPIC: BASIC OF PYTHON
CLASS: XII
DATE: 20/JUNE/2022, MONDAY
Q:1 Choose the Correct Answer :-
1. Which of the following are invalid identifiers in Python?
a. Total-sum
b. Error
c. Error_count
d. None of these

2. A ____________ is a sequence of one or more characters used to provide a name for


a given program element.
a. Identifier
b. Variable
c. String
d. Character

3. Identify the invalid identifier below.


a. _2017discount
b. Profit
c. Total-discount
d. Totaldiscount

4. _____________ are not allowed as part of an identifier.


a. Spaces
b. Numbers
c. Underscore
d. All of these

5. Identifiers may contain letters and digits, but cannot begin with a _____________.
a. Character
b. Digit
c. Underscore
d. Special Symbols

6. Which is not a reserved keyword in Python?


a. insert
b. except
c. import
d. yield

7. Identify the invalid keyword below.


a. and
b. as
c. while
d. until

8. _____________ is an identifier that has predefined meaning.


a. variable
b. identifier
c. keyword
d. None of these

9. How many operands are there in the following arithmetic expression?


6 * 35 + 8 – 25 =>
a. 4
b. 3
c. 5
d. 8

10. How many binary operators are there in the following arithmetic expression?
− 6 + 10 / (23 + 56)
a. 2
b. 3
c. 4
d. 5

11. Which operator returns the remainder of the operands?


a. /
b. //
c. %
d. **

12. A _____________ is a name that is associated with a value.


a. identifier
b. keyword
c. variable
d. None of these

13. Which of the following is correct about Python?


a. Python is a high-level, interpreted, interactive and object-oriented
language.
b. Python is designed to be highly readable.
c. It uses English keywords frequently and has fewer syntactical
constructions.
d. All of the above.

14. In Python an identifier is _____________.


a. Machine Dependent
b. Keyword
c. Case Sensitive
d. Constant

15. Which of the following operator is truncation division operator?


a. /
b. %
c. |
d. //

16. Which of the following are advantages of using function in program?

a. It increases readability of program.


b. It increases reusability.
c. It makes debugging easier.
d. All of the above

17. Which of the following is not the mode of interacting with python?

a. Interactive Mode
b. Script Mode
c. Hybrid Mode
d. None of the above

18. What will be the data type of the following variable?

A = ‘101’
a. Integer
b. String
c. Float
d. None of the above

19. Smallest element of of python coding is called __________


a. Identifiers
b. Token
c. Keywords
d. Delimiters
20. Write the output of the following code:

x=2
x=5
x=x+x
print(x)
a. 7
b. 4
c. 10
d. Error

21. Each statement in python is terminated by ___________


a. Semicolon(;)
b. Colon(:)
c. Comma(,)
d. None of the above

22. Which of the following is a relational operator:

a) >
b) //
c) or
d) **

23. Which of the following is a logical operator:

a) +
b) /=
c) and
d) in

24. Which one is a arithmetic operator:

a) not
b) **
c) both i & ii
d) Only ii 

25.The input() function always returns a value of ……………..type.

a) Integer
b) float
c) string 
d) Complex

26.……….. function is used to determine the data type of a variable.

a) type( ) 
b) id( )
c) print( )
d) str( )
27.The smallest individual unit in a program is known as a……………

a) Token 
b) keyword
c) punctuator
d) identifier

28. Which of the following is an invalid identifier?


a) CS_class_XII
b) csclass12
c) _csclass12
d) 12CS

29. Which of the following are symbols used for computation or logical comparison in
a program?
a) Identifiers
b) Literals
c) Keywords
d) Operators

30. Which of the following is correct statement to computer square of variable x in


python?
a) x * 2
b) x power 2
c) x ** 2
d) x // 2

Q: 2:- Answer the following Question:-


1] What are the terms Interactive mode and Script Mode in Python?
2] What is Variable in Python? Write its naming rule to declare python variable or identifier?
3] What is token? Define keyword and identifier with example?

//END OF THE MCQ TEST //

You might also like