测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A32003. 执行下面Python代码后,输出的结果不可能是89781。( )import randomi = 1s = ""while i <= 5: a = random.randint(0, 9) if a % 3 == (i + 1) % 3: s += str(a) i += 1print(s)

判断题 中等

题目描述

执行下面Python代码后,输出的结果不可能是89781。(    )

import random

i = 1

s = ""

while i <= 5:

     a = random.randint(0, 9) 

     if a % 3 == (i + 1) % 3:

          s += str(a)

          i += 1

print(s)

选项(单选)

上一题 下一题