• 2022-05-30
    执行下述代码: count = 5 def print_num(): count = 2 count += 1 print(count) 当调用print_num()函数时,输出结果为( )
  • 2

    内容

    • 0

      请阅读下面的程序: count = 0 while count < 5: print(count, '小于5') if count == 2: break count += 1 else: print(count, "不小于5") 关于上述程序的说法中,描述错误的是

    • 1

      下列程序运行后,输出结果为_________ count=0 for letter in 'Python': count=count+1 if letter == 'h': break print(count)

    • 2

      使用while 语句实现打印出1至10.count = 1while ( ) print (count) count = count + 1 A: count B: True C: count D: count

    • 3

      哪行代码会导致错误?()num=[5,4,3,[2],1]print(num[0])print(num[3][0])print(num[5])

    • 4

      下面的代码输出什么?() num=7 if num>3: print(“3”) if num<5: print(“5”) if num==7: print(“7”)