摘要:
第一版,缺点只能猜一次。 1 age_of_archerzon = 22 2 3 guess_age = int(input("guess age:")) 4 5 if guess_age == age_of_archerzon: 6 print("Yes,you got it!") 7 elif 阅读全文
摘要:
结构: 1 for i in range(10): 2 print(i) 每隔1个数打印一次(插值): 1 for i in range(0,10,2) 2 print(i) for循环里面嵌套一个for循环: 1 for i in range(10): 2 print(" ",i) 3 for j 阅读全文
摘要:
while循环: 1 count = 0 2 3 while True: 4 print("count:%s"%count) 5 count += 1 6 if count >1000: 7 break 阅读全文