Data Types and Operators Flashcards

1
Q

The symbols that are used in Python Programs to form an expression are known as

A

Operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Logical OR operator and Logical AND operator have a low precedence than which operator.

A

Relational Operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which Operator has higher precedence than relational and arithmetic operators.?

A

Logical NOT Operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Any part in a program which can have value is called an

A

Expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many types of Expressions are there?

A

There are four types of Expressions:

  1. Arithmetic Expression
  2. Logical Expression
  3. Relational Expression
  4. String Expression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The order in which operators are applied is called

A

Precedence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When two or more operators have same precedence what associativity they follow ?

A

Left to Right Associativity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is Expression Evaluation done?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The Process of converting a data type into another data type is known as

A

Type Conversion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which type Conversion doesn’t need any user involvement ?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which Type Conversion is called typecasting and why?

A

Explicit Type Conversion aka typecasting coz the user changes(casts) the data type of the object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly