Computer Science, asked by cswarna2473, 11 months ago

What will be the output of this program?
a = 20.3
b = ‘Python’
c = ‘"Python"‘
d = 21
print isinstance(a, float),
print isinstance(b, (str, int)),
print isinstance(c, (str, str)),
print isinstance(d, (float, str))

Answers

Answered by Abhis506
0

C - Inyyhfgbput and Output in

Answered by Anonymous
0

The output is as follows:

a = 20.3

b = ‘Python’

c = ‘"Python"‘

d = 21

print isinstance(a, float),                // to check whether a is float or not

print isinstance(b, (str, int)),           // to check whether b is int ot not

print isinstance(c, (str, str)),           // to check whether c is string or not

print isinstance(d, (float, str))        // to check whether d is string or not

Output :

True

True

True

False

Similar questions