python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习:第1项
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习:第1项相关的知识,希望对你有一定的参考价值。
#!/usr/bin/python3
for count in range(11): # range iteration
if count != 0 and count % 2 == 0: # conditional statement
print('count =', count) # even values, n % 2 == 0
print('Goodbye!')
'''
MITx 600.1x | Week 1 | Python Basics | 2. Core Elements of Programs | Exercise for: Item 1
count = 2
count = 4
count = 6
count = 8
count = 10
Goodbye!
'''
以上是关于python MITx 600.1x |第1周| Python基础知识| 2.程序的核心要素|练习:第1项的主要内容,如果未能解决你的问题,请参考以下文章