Data Types and Operators Flashcards
The symbols that are used in Python Programs to form an expression are known as
Operators
Logical OR operator and Logical AND operator have a low precedence than which operator.
Relational Operator
Which Operator has higher precedence than relational and arithmetic operators.?
Logical NOT Operator
Any part in a program which can have value is called an
Expression
How many types of Expressions are there?
There are four types of Expressions:
- Arithmetic Expression
- Logical Expression
- Relational Expression
- String Expression
The order in which operators are applied is called
Precedence
When two or more operators have same precedence what associativity they follow ?
Left to Right Associativity.
How is Expression Evaluation done?
It is done from Left to Right Based on Operator Precedence. Solve once at a time.
e.g. 7+5//4+4-10+5//6 7+1+4-10+5//6 7+1+4-10+0 8+4-10+0 12-10+0 2+0=2
The Process of converting a data type into another data type is known as
Type Conversion
Which type Conversion doesn’t need any user involvement ?
Implicit Type Conversion(This conversion takes place during compilation or run time.)
a=6 b=5.5 sum=a+b print(sum) print(type(sum)
output: 11.5
Which Type Conversion is called typecasting and why?
Explicit Type Conversion aka typecasting coz the user changes(casts) the data type of the object.