大家好!我解决问题,有问题,我不明白问题的解决方案,他们告诉我我很接近,但仍然没有。挑战本身:编写一个脚本,打印从 0 到 100 的 7 的倍数。每行打印一个倍数,并避免打印任何不是 7 的倍数的数字。请记住,0 也是 7 的倍数。(Вопрос 4 Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that aren't multiples of 7. Remember that 0 is also a multiple of 7.
)
我决定:
for x in range(0,100):
print(x**3)
但他们回答我:不是。请记住,0 可以被所有数字整除。( Not quite. Remember that 0 is a multiple of all numbers.
) (英语任务,通过谷歌翻译器翻译)你想做什么?
一个更 Pythonic 的方式是这样的: