摘要:
x=1 i=1 while i<100: i+=1 if i%2==0: x+=1 print(i,end=" ") if x%10==0: print() print("偶数一共有%d个"%(x)) 这是关于while循环 这个程序实现了100以内偶数的输出以及换行 x=0 for i in ra 阅读全文
摘要:
import random x=(random.randint(0,100)) while True: try: y=int(input("请输入数字!")) except ValueError: print("报歉 我无法理解") continue if x<y: print("猜大了!") co 阅读全文