Computer Science

What will be returned by Python as result of following statements?

(a) >>> type(0)

(b) >>> type(int(0))

(c) >>>.type(int('0')

(d) >>> type('0')

(e) >>> type(1.0)

(f) >>> type(int(1.0))

(g) >>>type(float(0))

(h) >>> type(float(1.0))

(i) >>> type( 3/2)

Python Funda

50 Likes

Answer


(a) <class 'int'>

(b) <class 'int'>

(c) SyntaxError: invalid syntax

(d) <class 'str'>

(e) <class 'float'>

(f) <class 'int'>

(g) <class 'float'>

(h) <class 'float'>

(i) <class 'float'>

Answered By

32 Likes


Related Questions