下面的代码输出什么?() num=7 if num>3: print(“3”) if num<5: print(“5”) if num==7: print(“7”)
举一反三
- 哪行代码会导致错误?()num=[5,4,3,[2],1]print(num[0])print(num[3][0])print(num[5])
- 下面的代码输出什么?() nums=[5,4,3,2,1 print(num[1])
- 下面代码的输出结果是 sum = 1.0 for num in range(1,4): sum+=num print(sum)
- 下列程序的输出结果是() 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)
- num=float(input('输入一个数字:\n'))<br/>num=int(num)<br/>num=int((num+5)/2)<br/>num=num*2-5<br/>num=int(num%5)<br/>print(num)输入:14.5输出:______