0% found this document useful (0 votes)
14 views3 pages

G12 OT Python Fundamentals

This document is an objective test for Grade 12 Computer Science focusing on Python fundamentals. It includes a variety of questions related to Python syntax, data types, functions, and programming concepts. The test is designed to assess students' understanding of Python programming within a 30-minute timeframe.

Uploaded by

S Mukil
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)
14 views3 pages

G12 OT Python Fundamentals

This document is an objective test for Grade 12 Computer Science focusing on Python fundamentals. It includes a variety of questions related to Python syntax, data types, functions, and programming concepts. The test is designed to assess students' understanding of Python programming within a 30-minute timeframe.

Uploaded by

S Mukil
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/ 3

Grade : 12 ​ ​ ​ ​ Objective Test ​ ​ ​ Computer Science (083)

Time : 30 mins.​ ​ Python Fundamentals(2)​ ​ Marks: 30​ ​ ​


S. A
no

1 print(x)
x = 10
print(x)

2 a = 10
b = 12.5
print( type(a))
print( type(b))

3 print(“Print”, “( )”, “Function”, sep = “#”)

4 A _______________ function without any value or name or expression prints a blank line.

5 x=20
print(x)
x = ‘DOBBS’
print(x)

6 The default value for end argument is ______________ and sep argument is
___________in print function.

7 >>> x=int(input(“Enter a value:”)


Enter a value: Twelve
print(x)

8 a, b = 20,30
print(‘a = ‘, a , end = ‘ ‘)
print(‘b = ‘, b )

9 Names given to different parts of a Python program are ______________

10 c=’hi’
d = 5+8j
print( type(c))
print( type(d))

11 >>>a=input(“Enter a value:”)
Enter a value: 5
>>>b=input(“Enter a value:”)
Enter a value: 7
>>>a+b

12 Which of the following is not a keyword?


a) finally b) nonlocal c) dictionary d) yield

13 An escape sequence for a bell character is ____________

14 To print a text without ending it with a newline,_________________ argument is used


with print( ).

15 The _______________ function gets the input from the user.

16 print(“Hello”,\
end=” “)

print(“World”)

17 Non - executable, additional lines added to the program is called __________________

18 Single line comment begins with _______________ symbol.

19 >>>a=int(input(“Enter a value:”))
Enter a value: 9
>>>b=int(input(“Enter a value:”))
Enter a value: 23
>>>a+b

20 x , y = 2,6
x , y = y , y+2
print(x, y)

21 x, y = 7, 2
x,y,x = x+1, y+3, x+10
print(x,y)

22 x=40
y=x+1
x=20, y+x
print(x,y)

23 x , y = 20,60
y,x,y = x,y-10,x+10
print(x,y)

24 a, b = 12, 13
print(print(a+b))

25 26 and 28 are ASSERTION AND REASONING based questions. Mark the correct choice as

(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
26 Assertion: Python supports dynamic typing of variables.
Reason: A variable can hold values of different types at different times, in a program

27 Assertion: A Python program can contain executable and non-executable items.


Reason: The comments are the non-executable parts of a program.

28 Assertion: In Python, blocks are represented through indentation.


Reason: Blocks in Python are the simple statements.

29 a,b = 12,13
c,b=a*2, a/2
print(a,b,c)

30 print(type(int (587.345) ) )

You might also like