摘要:
count = 0sum = 0while count < 100: if count == 88: count = count +1 continue # pass elif count %2 == 0: sum = sum - count else: sum = sum + count coun 阅读全文
摘要:
while True: choice = input("请选择A、B、C中的一个:") if choice == "A": print("走大路回家") T = input("选公交车还是步行:") if T == "公交车": print("10分钟后到家") break else: print( 阅读全文
摘要:
content = input("请输入内容:")sum = 0lst = content.split("+")for i in lst: sum = sum + int(i.strip())print(sum) 阅读全文
摘要:
content = input("请输入内容:")count = 0for i in content: if i.isdigit(): #判断是不是整数 count = count + 1print(count) 阅读全文