第六章测试
1.What will be the output of the following Python code? (   )
A:Reports error as one argument is required while creating the object B:Runs normally, doesn’t display anything C:Displays 0, which is the automatic default value D:Reports error as display function requires additional argument
答案:A
2.What will be the output of the following Python code?  (  )
A:Error B:‘New’ C:‘Old’ D:Nothing is printed 3.What will be the output of the following Python code?  (   )
A:Exception is thrown B:Demo C:test D:__main__ 4.Which one of the followings is not correct about Class hierarchy? ( )
A:Subclass can not add more behavior/methods B:Subclass can override the methods inherited from superclass C:Subclass can inherit all attributes from superclass D:Subclass can have methods with same name as superclass 5.What will be the output of the following Python code?  (   )
A:Error, the syntax of the invoking method is wrong B:Error because class B inherits A but variable x isn’t inherited C:0 1 D:0 0

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(6) dxwkbang
返回
顶部