Python For Everybody
文章目录
前言
记录学习Python 的基本知识,内容来源:Python For Everybody(From Prof. Charles Severance)
持续更新…
第 1 章 Why we program?
1. Hardware architecture:
2. Reserved word:
False, class, return, is, finally, None, if, for, lambda,
continue, True, def, from, while, nonlocal, and, del,
global, not, with, as, elif, try, or, yield, assert,
else, import, pass, break, except, in, raise
3. Program steps:
conditional
x = 5
if x < 10:
print('Smaller')
if x > 20:
print('Bigger')
print('Finis')
repeated
n = 5
while n > 0:
print(n)
n = n - 1
print('Blastoff!')