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'>

13 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
  3. sir in question c their should but their is error given

    ReplyDelete
  4. I have a problem in C number as it is showing int in interpreter mode of python but in your solution it is error which one should I follow?

    ReplyDelete

Post a Comment

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

Previous Post Next Post