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
原文地址:http://yangyy.blog.51cto.com/12354524/1878712