----------------------------------------------斜体样式
count = 3
while count > 0 :
name = input("请猜测并输入用户名字:")
if name == "tom":
print("你好聪明")
break
else:
count -= 1
continue
else:
print("猜测次数结束,你好笨蛋")
# 1-2+3-4+5-6......99 的最终结果:
num = 1
o_sum = 0
j_sum = 0
while num <= 99:
if num % 2 ==0:
o_sum += num
if num%2 ==1:
j_sum += num
num += 1
else:
print( j_sum - o_sum)