Data Handling Worksheet Class 11 Computer Science

Data Handling Worksheet Class 11 Computer Science

 

Q.1: Which Python built-in function returns the unique number assigned to an object?

a) Identity()

b) Id()

c) Refnum()

d) Ref()

 

Q.2: The operator used to check if both the operands reference the same object memory, is the ………. operator.

a) In

b) Id

c) Is

d) ==

 

Q.3: Python operator always yields the result of ………. datatype.

a) Integer

b) Floating type

c) Complex

d) All of these

 

Q.4: What is the value of the expression 100 // 25 ?

a) 4

b) 0

c) 5

d) None of these

 

Q.5: In the Python statement x = a + 5 – b : a and b are

a) Operands

b) Expression

c) Operator

d) Equation

 

Q.6: Which of the following operators has the lowest precedence ?

a) Not

b) %

c) And

d) +

 

Q.7: Which of the following is not an immutable type in Python ?

a) String

b) Tuples

c) Set

d) List

 

Q.8: Which of the following is the truncation division operator in Python?

a) \

b) |

c) //

d) %

 

Q.9:What  is the value of the expression 10+ 3**3*2?

a) 28

b) 739

c) 829

d) 64

 

Q.10: In  Python , a variable must be declared  before it is assigned a value .

a) True

b) False

c) Only in function

d) Only in modules

 

Q.11: The explicit conversion of an operand to a specific type is called …………… .

 

Q.12:Identifiers , literals,strings,list , tuples, sets are all ……………. .

 

Q.13: Write the output of the following :

a =5

b=-3

c=25

d=-10

a+b+c > a+c-b*d

str(a+b+c > a+c-b*d) ==str(true)

len(str(a+b+c > a+c-b*d)) == len(str(true))

 

Q.14: What is the output of the following :

a = 3+ 5/8

b =3  + float(5)/8

c = 3 + 5/8.0

 

Q.15: What do you understand by term ‘immutable’?

 

Q.16: Why is Boolean considered a subtype of integer ?

 

Q.17 : Which data  types of  Python handle number ?

 

Q.18: What are augmented assignment operators? How are they useful?

 

Q.19 : What is the difference between implicit type conversion and explicit type conversion ?

 

Q.20: How does the // operator differ from the / operator?

 

 

Solution for  Data Handling Worksheet Class 11 Computer Science given below:

 

 

Q.1: Which Python built-in function returns the unique number assigned to an object?

b) Id()

 

Q.2: The operator used to check if both the operands reference the same object memory, is the ………. operator.

c) Is

 

Q.3: Python operator always yields the result of ………. datatype.

b) Floating type

 

Q.4: What is the value of the expression 100 // 25 ?

a) 4

 

Q.5: In the Python statement x = a + 5 – b : a and b are

a) Operands

 

Q.6: Which of the following operators has the lowest precedence ?

c) and

 

Q.7: Which of the following is not an immutable type in Python ?

c) Set

 

Q.8: Which of the following is the truncation division operator in Python?

c) //

 

Q.9:What  is the value of the expression 10+ 3**3*2?

d) 64

 

Q.10: In  Python , a variable must be declared  before it is assigned a value .

b) False

 

Q.11: The explicit conversion of an operand to a specific type is called …………… .

Answer: Type casting

 

Q.12:Identifiers , literals,strings,list , tuples, sets are all ……………. .

Answer : Atoms

 

Q.13: Write the output of the following :

a =5

b=-3

c=25

d=-10

a+b+c > a+c-b*d

str(a+b+c > a+c-b*d) ==str(true)

len(str(a+b+c > a+c-b*d)) == len(str(true))

 

Answer :

True

False

True

 

Q.14: What is the output of the following :

a = 3+ 5/8

b =3  + float(5)/8

c = 3 + 5/8.0

Answer :  3       3.625        3.625

 

Q.15: What do you understand by term ‘immutable’?

Answer :  Immutable means unchangeable. In Python, immutable types are those whose values cannot be changed in place. Whenever one assigns a new value to a variable referring to immutable type, variable’s reference is changed and previous value is left unchanged

 

Q.16: Why is Boolean considered a subtype of integer ?

Answer : Boolean values True and False internally map to integers 1 and 0. That is, internally True is considered equal to 1 and False equal to 0 (zero). When 1 and 0 are converted to Boolean through bool() function, they return True and False. That is why Booleans are treated as a subtype of integers.

 

Q.17 : Which data  types of  Python handle number ?

i) Plain integers

ii) Long integers

iii) Boolean

iv) Floating – point numbers

v) Complex numbers

 

Q.18: What are augmented assignment operators? How are they useful?

Answer:

Augmented assignment operators combine the impact of an arithmetic operator with an assignment operator. For example, to add the value of b to the value of a and assign the result back to a then instead of writing:

a = a + b

we can write

a += b.

Augmented assignment operators are useful as they provide a shorthand way by combining the arithmetic and assignment operators.

 

Q.19 : What is the difference between implicit type conversion and explicit type conversion ?

Answer :

Implicit conversion is where the interpreter helps us out and automatically converts one data type into another, without having to explicitly tell it to do so

Explicit conversion is where we manually convert from one data type to another by calling the relevant function for the data type we want to convert to, also called as Casting

Q.20: How does the // operator differ from the / operator?

Answer : The Division operator (/) divides its first operand by second operand and always returns the result as a float value whereas Floor Division operator (//) divides its first operand by second operand and truncates the fractional part of the result and returns it as an int value. Floor Division operator is useful in situations where we only need the integer part of the division operation result.