Page 104 - Information_Practice_Fliipbook_Class11
P. 104
Ø The type NoneType has only one member, namely, None.
Ø A dictionary is an unordered set of key-value pairs enclosed in curly brackets {}.
Ø Numeric data types (int, float, and complex), bool, str, and tuple are immutable data types.
Ø Lists and dictionaries are mutable data types.
Ø Operators are used to perform an operation on the values, called operands.
Ø A unary operator requires only one operand, while a binary operator requires two operands.
Ø The arithmetic operators are used to perform arithmetic operations: addition (+), subtraction(-),
multiplication(*), division(/, %,//), and exponentiation(**).
Ø Assignment operators are used to assign the value of the operand on the right-hand side of the assignment
operator to the operand on the left-hand side of the operator.
Ø There are three logical operators: not, and, or.
Ø Identity operators are used for checking the data type of a variable.
Ø There are two identity operators: is and is not.
Ø Membership operators are used to check whether a particular value is a member of a given string, list, tuple,
set, or dictionary. A membership operation yields True or False.
Ø An expression in Python is defined as a valid combination of objects and operators.
Ø When an expression contains multiple operators, Python resolves the order of execution according to the
precedence of operators.
Ø Type conversion is the process of converting the value of one data type to another.
Ø Implicit type conversion, also known as coercion, takes place when a data value is converted from one data
type to another by the Python interpreter without explicit type conversion by the programmer. For example,
3+4.6 yields a floating point number.
Ø Explicit conversion, also called typecasting, takes place when a programmer gives such an instruction. For
example, int(7.4).
Ø If the rules of a programming language are not followed, the interpreter/compiler will flash an error. Such
errors are known as syntax errors.
Ø A program free from syntax errors may still contain logical errors leading to erroneous output.
Ø The process of identifying and removing logical errors is known as debugging.
Ø A runtime error may occur during the execution of the program.
Solved Exercises
A. Multiple Choice Questions
1. Which of the following are NOT numeric data types in Python?
a. str b. int c. Float d. complex
2. Which of the following is a mutable data type?
a. str b. int c. list d. tuple
3. Which of the following can be the value of a bool data type?
a. TRUE b. true c. True d. Truth
90 Touchpad Informatics Practices-XI

