执行下述代码: count = 5 def print_num(): count = 2 count += 1 print(count) 当调用print_num()函数时,输出结果为( )
举一反三
- 执行下述代码:count = 5def print_num(): count = 2 count += 1 print(count)当调用print_num()函数时,输出结果为() A: A.5 B: B.3 C: C.6 D: D.2
- 下列程序的输出结果是() num = 27 count = 0 while num > 0: if num % 2 == 0: num /=2 elif num % 3 ==0: num /= 3 else: num -=1 count += 1 print (count)
- count = 0 while count < 5: print (count, " 小于 5") count = count + 1 else: print (count, " 大于或等于 5")
- 下列程序的运行结果是( )。 count = 0 while count < 5: print(count, " is less than 5") count = count + 1 else: print(count, " is not less than 5")
- count = 0while count < 5: print( count) count = count + 2print( “Over!")