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

Chapter - 1 - Python Revision Tour - 1 (One Mark, MCQ Questions)

This document contains a chapter on Python revision with multiple choice questions, fill in the blank questions and true/false questions about Python concepts like variables, data types, operators, expressions and control flow statements. The chapter aims to help students revise core Python concepts.

Uploaded by

Faraz Ahmed
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)
183 views

Chapter - 1 - Python Revision Tour - 1 (One Mark, MCQ Questions)

This document contains a chapter on Python revision with multiple choice questions, fill in the blank questions and true/false questions about Python concepts like variables, data types, operators, expressions and control flow statements. The chapter aims to help students revise core Python concepts.

Uploaded by

Faraz Ahmed
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/ 2

GRADE – 12 COMPUTER SCIENCE

CHAPTER – 1 – PYTHON REVISION TOUR - 1


I. Multiple Choice Questions
1. Which of the following is an invalid variable?
a. my_day_2 b. 2nd_day c. Day_two d._2
2. Which of the following is not a keyword?
a. eval b. assert c. nonlocal d.pass
3. Which of the following cannot be a variable?
a. init b. in c. it d.on
4. Which of these is not a core data type?
a. Lists b. Dictionary c. Tuples d.Class
5. How would you write xy in Python as an expression?
a. x^y b. x**y c. x^^y d.none of these
6. What will be the value of the expression?
14 + 13 % 15
a. 14 b. 27 c. 12 d.0
7. Evaluate the expression given below if A = 16 and B = 15.
A % B // A
a. 0.0 b. 0 c. 1.0 d.1
8. What is the value of x?
x = int (13.25 + 4/2)
a. 17 b. 14 c. 15 d.23
9. The expression 8/4/2 will evaluate equivalent to which of the following expressions:
a. 8/(4/2) b. (8/4)/2
10. Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
a. <<, >> b. ** c. | d.%
11. Which of the following expressions results in an error?
a. float('12') b. int('12') c. float('12.5') d. int('12.5')
12. Which of the following statement prints the shown output below?
hello\example\test.txt
a. print("hello\example\test.txt") b. print("hello\\example\\test.txt")

c. print("hello\"example\"test.txt") d. print("hello"\example"\test.txt")
13. Which value type does input() return ?

a. Boolean b. String c.Int d. Float

14. Which two operators can be used on numeric values in Python?


a. @ b. % c. + d.#
15. Which of the following four code fragments will yield following output?
Eina
Mina
Dika
Select all of the function calls that result in this output
a. print('''Eina b. print('''EinaMinaDika''')
\nMina
\nDika''')

c. print('Eina\nMina\nDika') d. print('Eina
Mina
Dika')
16. Which of the following is valid arithmetic operator in Python:
a. // b.? c. < d. and
II. Fill in the Blanks
1. The smallest individual unit in a program is known as a ________.
2. A token is also called a ________________.
3. A ___________ is a word having special meaning and role as specified by programming language.
4. The data types whose values cannot be changed in place are called ___________ types.
5. In a Python expression, when conversion of a value's data type is done automatically by the
compiler without programmer's intervention, it is called ______________________.
6. The explicit conversion of an operand to a specific type is called ____________.
7. The _______ statement is an empty statement in Python.
8. A _______ statement skips the rest of the loop and jumps over to the statement following the loop.
9. The __________ statement skips the rest of the loop statements and causes the next iteration of the
loop to take place.
10. Python's ______________ cannot be used as variable name.
III. True/False Questions

1. The expression int(x) implies that the variable x is converted to integer. -___________
2. The value of the expressions 4/(3*(2 - 1)) and 4/3*(2 - 1) is the same. -___________
3. The value of the expressions 4/(3*(4 - 2)) and 4/3*(4 - 2) is the same. -___________
4. The expression 2**2**3 is evaluated as: (2**2)**3. -___________
5. A string can be surrounded by three sets of single quotation marks or by three sets of double
quotation marks. - ___________
6. Variables can be assigned only once. - ___________
7. In Python, a variable is a placeholder for data. - ______________
8. In Python, only if statement has else clause. - _____________
9. Python loops can also have else clause. - _________________
10. In a nested loop, a break statement terminates all the nested loops in one go. - ____________

You might also like