Q.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)


Match your result after executing above statements.



Answer =

(a)
<class 'int'>

(b)
<class 'int'>

(c)
Error

(d)
<class 'str'>

(e)
<class 'float'>

(f)
<class 'int'>

(g)
<class 'float'>

(h)
<class 'float'>

(i)
<class 'float'>

11 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. hello anna to you only da

    ReplyDelete
  2. why we need to click each question and then write, then again go for second question then again plz solve out this, IF YOU A WEB Designer I'm will there for you I am a good web developer,,


    email--swanitbhagwat765@gmail.com

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post