#### 12th Standard Computer Science English Medium Python - Variables and Operators Reduced Syllabus Important Questions With Answer Key 2021

12th Standard

Reg.No. :
•
•
•
•
•
•

Computer Science

Time : 01:00:00 Hrs
Total Marks : 100

Multiple Choice Questions

15 x 1 = 15
1. The Python prompt indicates that Interpreter is ready to accept instruction.

(a)

>>>

(b)

<<<

(c)

#

(d)

<<

2. Which operator is also called as Comparative operator?

(a)

Arithmetic

(b)

Relational

(c)

Logical

(d)

Assignment

3. Which of the following is not Logical operator?

(a)

Ternary

(b)

Relational

(c)

Logical

(d)

Assignment

4. Which operator is also called as Conditional operator?

(a)

Ternary

(b)

Relational

(c)

Logical

(d)

Assignment

5. In Python, the script mode programs can be stored with the extension.

(a)

.pyt

(b)

.pyh

(c)

.py

(d)

.pon

6. Which of the following mode cannot be written Python program?
(i) Interactive mode
(ii) Script mode
(iii) Calculator mode
(iv) Executable mode

(a)

i

(b)

ii

(c)

i and iii

(d)

iii and iv

7. Which of the following used to develop and run Python code?

(a)

GUI

(b)

Command prompt

(c)

IDLE

(d)

CUI

8. Which mode can also be used as a simple calculator?

(a)

Calc mode

(b)

Interactive mode

(c)

Script mode

(d)

Code mode

9. Which of the following indicates in Python that interpreter is ready to accept instructions?

(a)

>>>

(b)

<<<

(c)

.py

(d)

<<

10. Which function helps to enter data at run time by the user?

(a)

input ()

(b)

(c)

get ()

(d)

Pyinput ()

11. From the following statement absence of which one no message is displayed on the screen? variable = input ("prompt string")

(a)

Variable

(b)

input

(c)

"prompt string"

(d)

" "

12. Which of the following can not be identify by an identifier

(a)

constant

(b)

variable

(c)

function

(d)

class

13. In Python the delimiters are not used in

(a)

Expressions

(b)

functions

(c)

dictioncuries

(d)

strings

14. Python source file is created using _____ mode.

(a)

Interactive

(b)

Script

(c)

Procedure

(d)

Program

15. The inputs () accepts all data as _____ or ______

(a)

String or characters

(b)

String or numbers

(c)

Characters or numbers

(d)

integers or exponent

1. 2 Marks

10 x 2 = 20
16. What are the different modes that can be used to test Python Program ?

17. What are the different operators that can be used in Python ?

18. Write short notes on Exponent data?

19. How will you develop and run Python code?

20. How will you invoke python IDLE?

21. Name the tokens where the whitespace in necessary in python.

22. Find the odd man out? Give reason.
(i) sum = 100
(ii) regno = 12401
(iii) name = "Kannan"
(iv) name = "Kumar"

23. What are the uses of logical operator? Name the operators.

24. Assume a = 50 and b = 40. Trite the output the following statement.
(i) print ("The a > b or a = := b = ", a > b or a==b)
(ii) print ("The a > b and a == b = ", a > b and a==b)
(iii) print ("The not a > b == ", not a > b)

25. Write the output for the following code.
x,y = 50,150
Z = x if x > y else y
print ("Z is", Z)

1. 3 Marks

15 x 3 = 45
26. Write short notes on Arithmetic operator with examples.

27. What are the assignment operators that can be used in Python?

28. What are string literals? Explain.

29. Write the key features of Python.

30. Differentiate two ways in which Python programs can be written.

31. Write the function of the following
(i) Ctrl + N
(ii) Ctrl + S
(iii) F5

32. Fill in the blanks.
>>> city = $\overset { (1) }{ \_ \_ \_ \_ \_ }$ (" Enter your City ")
Enter your city $\overset { (2) }{ \_ \_ \_ \_ \_ }$
>>> print ("I am from", $\overset { (3) }{ \_ \_ \_ \_ \_ }$)
I am from Chennai

33. Fill up the blanks to get the following output from Python code given.
Output:
Enter Number 1 : 34
Enter Number 2 : 70
The Sum = 104
Code:
X = $\overset { (1) }{ \_ \_ \_ \_ \_ }$ (input ("Enter Number 1:"))
Y = $\overset { (2) }{ \_ \_ \_ \_ \_ }$ ($\overset { (3) }{ \_ \_ \_ \_ \_ }$ ("Enter Number 2 :"))
$\overset { (4) }{ \_ \_ \_ \_ \_ }$ ("The sum =", $\overset { (5) }{ \_ \_ \_ \_ \_ }$)

34. Why the following statement not accept the data as numbers? Give reason and also state what function is used to accept the number.

35. Write a Python programme to get the following output.
Output:
Enter Number 1 : 50
Enter Number 2 : 50
X = 50 Y = 50

36. Write a short note on comment statement.

37. Write a note on statement which are ignored by the Python interpreter.

38. What are the rules followed while defining python identifier?

39. Fill in the blanks.
(i) _____ statements are ignored by Python interpreter.
(ii) The value of an operator used is called _______
(iii) 100/30 = ______

40. Assume a = 1000 b = 10, Evaluate the following expression.
(i) a%30
(ii) a/b
(iii) b**2
(iv) b//3

1. 5 Marks

4 x 5 = 20
41. Describe in detail the procedure Script mode programming

42. Explain input() and print() functions with examples.

43. Discuss in detail about Tokens in Python

44. Write the output for the following python code..
x=10
x+=20
print ("The x + = 20 is =",x)
x-=5
print ("The x -= 5 is = ",x)
x*=5
print ("The x *= 5 is = ",x)
x/=2
print ("The x/ = 2 is = ",x)
x%=3
print ("The x %= 3 is = ",x)
x**=2
print ("The x **= 2 is = ",X)
x//=3
print ("The x//= 3 is = ",x)