一.循环 1.for names = ['Michal', 'Bob', 'tracy'] for name in names: print(name) sum = 0 for x in [1, 2, 3, 4, 5, 6, 7,8,9,10]: sum = sum + x print(sum) # 打印数字 0 - 9 for x in range(10): print(x) 2.while sum = 0 n = 99 while n > 0: sum = sum + n n = n - 2…