您的位置:首页 > 编程语言 > Python开发

python1+..+100

2016-12-01 22:10 344 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python 100