nick34992 of Python
2/2/2017 - 7:18 AM

MITx 600.1x | Week 1 | Python Basics | 2. Core Elements of Programs | Exercise 5b

MITx 600.1x | Week 1 | Python Basics | 2. Core Elements of Programs | Exercise 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.
'''