python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习5b
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习5b相关的知识,希望对你有一定的参考价值。
#!/usr/bin/python3
divisor = 2
for num in range(0, 10, 2):
print(num/divisor)
'''
MITx 600.1x | Week 1 | Python Basics | 2. Core Elements of Programs | Exercise 5b
0.0
1.0
2.0
3.0
4.0
range(0, 10, 2) means:
1. range start: 0.
2. range end: 10.
3. step: 2.
'''
以上是关于python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习5b的主要内容,如果未能解决你的问题,请参考以下文章