假设number的输入是9。以下程序将显示什么?number=eval(input(Enteraninteger:))isPrime=Trueforiinrange(2,number):()ifnumber%i==0:()isPrime=False()print(iis,i)()ifisPrime:()print(number,isprime)()break()else:()print(number,isnotprime)
假设number的输入是9。以下程序将显示什么?number=eval(input(Enteraninteger:))isPrime=Trueforiinrange(2,number):()ifnumber%i==0:()isPrime=False()print(iis,i)()ifisPrime:()print(number,isprime)()break()else:()print(number,isnotprime)
A.iis39isprime
B.iis39isnotprime
C.iis29isprime
D.iis29isnotprime
正确答案:iis29isprime
Tag:python语言程序设计 程序
时间:2022-01-17 20:24:47