在线名词解释大全 - Python程序设计 - 详细

4.16Supposeyouwritethecodetodisplay"Cannotgetadriver'slicense"ifageislessthan16and"Cangetadriver'slicense"ifageisgreaterthanorequalto16.Whichofthefollowingcodeiscorrect?I:ifage<16:print("Cannotgetadriver'slicense")ifage>=16:print("Cangetadriver'slicense")II:ifage<16:print("Cannotgetadriver'slicense")else:print("Cangetadriver'slicense")III:ifage<16:print("Cannotgetadriver'slicense")elifage>=16:print("Cangetadriver'slicense")IV:ifage<16:print("Cannotgetadriver'slicense")elifage==16:print("Cangetadriver'slicense")elifage>16:print("Cangetadriver'slicense")

A

 I and II


B

 II and III


C

 I, II, and III


D

 III and IV

E

 All correct

正确答案:
相关推荐
扫描二维码
关注公众平台