hncys 发表于 2018-8-16 08:25:16

python1+..+100

# -*- coding: cp936 -*-  
y = "yes"
  
while y == "yes":
  
         print "please input num"
  
         a = input()
  
         print "please input endnum"
  
         c = input()
  
         b=a+1
  
         while b<=c:
  
               a=a+b
  
               b=b+1
  
         print '答案为:' ; print a
  
         #y = "no"                        #取消“#”就是控制循环
  
         print "go on!? (yes or no):"
  
         #y = raw_input()   #把输入结果作为字符串给予变量y
页: [1]
查看完整版本: python1+..+100