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.
What is MongoDB? MongoDB is a cross-platform, simple document-oriented NoSQL database that provides high performance, high availability and easy scalability. It is used for high volume data storage. It is a platform-independent interface which means that it can run on any platform like Windows, Linux, Unix, etc. It was designed to work with community servers….
KBC Quiz Game in Python for Class 11 This project will help the students of class 11 to better understand the concept of list and random function. Features of KBC Quiz Game in Python : → User will get random questions every time →One out of four given options is correct → If…
Python Function Arguments and Parameters Notes In Python, arguments are values passed to a function when it is called. There are different types of arguments that can be used in Python functions: 1. Positional Arguments: These are the most common type of arguments in Python. They are passed to a function based on their position….
String Manipulation in Python Questions and Answers Class 11-12 Q.1 : Which of the following returns a copy of the string with its first character capitalized ? a) string.upper() b) string.capitalize() c) capitalize() d) all of these Q.2:Which of the following is not a python legal string operation ? a) ‘abc’ + ‘abc’…
80+ Important MCQ on Computer Network Class 12 1. A Computer Network: a) Is a collection of hardware components and computers? b) Is interconnected by communication channels c) Allows sharing of resources and information d) All of the above 2. What is a Firewall in computer network? a) The physical boundary of network…
Last updated on December 28th, 2023 at 09:59 amUsing of Datetime Library in python Class 11-12 Notes As python provides a large set of library, it also contains datetime library. This library displays the date in YYYY-MM-DD format. Python datetime module handles the extraction and formatting of date and time variables. All the attributes can…