小编The*_*son的帖子

使用循环的Python程序

鉴于此Python程序:

  num = input("Enter a number: ")
  result = 1024
  for i in range(num):
     result = result / 2
  print result
Run Code Online (Sandbox Code Playgroud)

如果输入的数字是4,为什么这个程序的输出是64?

python math for-loop

0
推荐指数
2
解决办法
821
查看次数

标签 统计

for-loop ×1

math ×1

python ×1