欢迎来到天天文库
浏览记录
ID:60789280
大小:75.50 KB
页数:29页
时间:2020-12-18
《PYTHON测试题复习过程.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、精品好文档,推荐学习交流1.whatdoesthefollowingcodedo?(B)defa(b,c,d):passA.definesalistandinitializesitB.definesafunction,whichdoesnothingC.definesafunction,whichpassesitsparametersthroughD.definesanemptyclass2.whatgetsprinted?Assumingpythonversion2.x(A)printtype(1/2)A.B.C.2、e'float'>D.E.3.whatistheoutputofthefollowingcode?(E)printtype([1,2])A.B.C.D.E.4.whatgetsprinted?(C)deff():passprinttype(f())A.B.C.D.E.3、>5.whatshouldthebelowcodeprint?(A)printtype(1J)A.B.C.D.E.仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流6.whatistheoutputofthefollowingcode?(D)printtype(lambda:None)A.B.C.D.E.4、e'bool'>7.whatistheoutputofthebelowprogram?(D)a=[1,2,3,None,(),[],]printlen(a)A.syntaxerrorB.4C.5D.6E.78.whatgetsprinted?Assumingpythonversion3.x(C)print(type(1/2))A.B.C.D.E.9.Whatgetsprinted?(C)d=lambdap:p*2t=lambdap:p*3x=2x5、=d(x)x=t(x)x=d(x)printxA.7B.12C.24D.36E.48仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流10.Whatgetsprinted?(A)x=4.5y=2printx//yA.2.0B.2.25C.9.0D.20.25E.2111.Whatgetsprinted?(C)nums=set([1,1,2,3,3,3,4])printlen(nums)A.1B.2C.4D.5E.712.Whatgetsprinted?(A)x=Truey=Falsez=Falseifxoryandz:print"yes"else:pri6、nt"no"A.yesB.noC.failstocompile13.Whatgetsprinted?(C)x=Truey=Falsez=Falseifnotxory:print1elifnotxornotyandz:print2仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流elifnotxoryornotyandx:print3else:print4A.1B.2C.3D.414.IfPYTHONPATHissetintheenvironment,whichdirectoriesaresearchedformodules?(D)A)PYTHONPATH7、directoryB)currentdirectoryC)homedirectoryD)installationdependentdefaultpathA.AonlyB.AandDC.A,B,andCD.A,B,andDE.A,B,C,andD15.Inpython2.6orearlier,thecodewillprinterrortype1ifaccessSecureSystemraisesanexceptionofeitherAccessErrortypeorSecurityErrortype(B)try:ac
2、e'float'>D.E.3.whatistheoutputofthefollowingcode?(E)printtype([1,2])A.B.C.D.E.4.whatgetsprinted?(C)deff():passprinttype(f())A.B.C.D.E.3、>5.whatshouldthebelowcodeprint?(A)printtype(1J)A.B.C.D.E.仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流6.whatistheoutputofthefollowingcode?(D)printtype(lambda:None)A.B.C.D.E.4、e'bool'>7.whatistheoutputofthebelowprogram?(D)a=[1,2,3,None,(),[],]printlen(a)A.syntaxerrorB.4C.5D.6E.78.whatgetsprinted?Assumingpythonversion3.x(C)print(type(1/2))A.B.C.D.E.9.Whatgetsprinted?(C)d=lambdap:p*2t=lambdap:p*3x=2x5、=d(x)x=t(x)x=d(x)printxA.7B.12C.24D.36E.48仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流10.Whatgetsprinted?(A)x=4.5y=2printx//yA.2.0B.2.25C.9.0D.20.25E.2111.Whatgetsprinted?(C)nums=set([1,1,2,3,3,3,4])printlen(nums)A.1B.2C.4D.5E.712.Whatgetsprinted?(A)x=Truey=Falsez=Falseifxoryandz:print"yes"else:pri6、nt"no"A.yesB.noC.failstocompile13.Whatgetsprinted?(C)x=Truey=Falsez=Falseifnotxory:print1elifnotxornotyandz:print2仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流elifnotxoryornotyandx:print3else:print4A.1B.2C.3D.414.IfPYTHONPATHissetintheenvironment,whichdirectoriesaresearchedformodules?(D)A)PYTHONPATH7、directoryB)currentdirectoryC)homedirectoryD)installationdependentdefaultpathA.AonlyB.AandDC.A,B,andCD.A,B,andDE.A,B,C,andD15.Inpython2.6orearlier,thecodewillprinterrortype1ifaccessSecureSystemraisesanexceptionofeitherAccessErrortypeorSecurityErrortype(B)try:ac
3、>5.whatshouldthebelowcodeprint?(A)printtype(1J)A.B.C.D.E.仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流6.whatistheoutputofthefollowingcode?(D)printtype(lambda:None)A.B.C.D.E.4、e'bool'>7.whatistheoutputofthebelowprogram?(D)a=[1,2,3,None,(),[],]printlen(a)A.syntaxerrorB.4C.5D.6E.78.whatgetsprinted?Assumingpythonversion3.x(C)print(type(1/2))A.B.C.D.E.9.Whatgetsprinted?(C)d=lambdap:p*2t=lambdap:p*3x=2x5、=d(x)x=t(x)x=d(x)printxA.7B.12C.24D.36E.48仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流10.Whatgetsprinted?(A)x=4.5y=2printx//yA.2.0B.2.25C.9.0D.20.25E.2111.Whatgetsprinted?(C)nums=set([1,1,2,3,3,3,4])printlen(nums)A.1B.2C.4D.5E.712.Whatgetsprinted?(A)x=Truey=Falsez=Falseifxoryandz:print"yes"else:pri6、nt"no"A.yesB.noC.failstocompile13.Whatgetsprinted?(C)x=Truey=Falsez=Falseifnotxory:print1elifnotxornotyandz:print2仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流elifnotxoryornotyandx:print3else:print4A.1B.2C.3D.414.IfPYTHONPATHissetintheenvironment,whichdirectoriesaresearchedformodules?(D)A)PYTHONPATH7、directoryB)currentdirectoryC)homedirectoryD)installationdependentdefaultpathA.AonlyB.AandDC.A,B,andCD.A,B,andDE.A,B,C,andD15.Inpython2.6orearlier,thecodewillprinterrortype1ifaccessSecureSystemraisesanexceptionofeitherAccessErrortypeorSecurityErrortype(B)try:ac
4、e'bool'>7.whatistheoutputofthebelowprogram?(D)a=[1,2,3,None,(),[],]printlen(a)A.syntaxerrorB.4C.5D.6E.78.whatgetsprinted?Assumingpythonversion3.x(C)print(type(1/2))A.B.C.D.E.9.Whatgetsprinted?(C)d=lambdap:p*2t=lambdap:p*3x=2x
5、=d(x)x=t(x)x=d(x)printxA.7B.12C.24D.36E.48仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流10.Whatgetsprinted?(A)x=4.5y=2printx//yA.2.0B.2.25C.9.0D.20.25E.2111.Whatgetsprinted?(C)nums=set([1,1,2,3,3,3,4])printlen(nums)A.1B.2C.4D.5E.712.Whatgetsprinted?(A)x=Truey=Falsez=Falseifxoryandz:print"yes"else:pri
6、nt"no"A.yesB.noC.failstocompile13.Whatgetsprinted?(C)x=Truey=Falsez=Falseifnotxory:print1elifnotxornotyandz:print2仅供学习与交流,如有侵权请联系网站删除谢谢29精品好文档,推荐学习交流elifnotxoryornotyandx:print3else:print4A.1B.2C.3D.414.IfPYTHONPATHissetintheenvironment,whichdirectoriesaresearchedformodules?(D)A)PYTHONPATH
7、directoryB)currentdirectoryC)homedirectoryD)installationdependentdefaultpathA.AonlyB.AandDC.A,B,andCD.A,B,andDE.A,B,C,andD15.Inpython2.6orearlier,thecodewillprinterrortype1ifaccessSecureSystemraisesanexceptionofeitherAccessErrortypeorSecurityErrortype(B)try:ac
此文档下载收益归作者所有