展开全部
import sys
tmpy = sys.stdin.readlines()
cold = 0
warm = 0
for i in tmpy:
if int(i) <= 60:
cold = cold + 1
if int(i) >= 80:
warm = warm + 1
print "cold = ", cold
print "warm = ", warm
用ctrl+d结束输入
tmpy = sys.stdin.readlines()
cold = 0
warm = 0
for i in tmpy:
if int(i) <= 60:
cold = cold + 1
if int(i) >= 80:
warm = warm + 1
print "cold = ", cold
print "warm = ", warm
用ctrl+d结束输入
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的题呢?
更多追问追答
追问
题目1
追答
晕。你们是用英文出题的啊。
heating_degree_days=0
cooling_degree_days=0
while 1:
s_input=raw_input("please input the average daily temps, press q to finish your input:")
if s_input=="q":
print("total heating degree-days is %d" %(heating_degree_days,))
print("total cooling degree-days is %d" %(cooling_degree_days,))
break;
degree=int(s_input)
if degree80:
cooling_degree_days+=degree
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询