最贊回答 / 付付meow
你把else:if改成elif試試,score = raw_input("Please tall me your score:")? ? ?if score >= 90: ? ?print "excellent"?? ? elif score >= 80: ? ? ? ?print "good" ??? ? ?elif score >= 60: ? ? ? ? ? ?print "passed" ? ? ? ?? ? else: ? ? ? ? ? ?print "failed"
2016-12-26
最新回答 / 慕斯5482594
<...code...>[1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86, 91, 96][55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
2016-12-23
最贊回答 / chuxuan
當x為偶數時,x%2==0為真,執行continue跳出循環,下一次循環時x的值并未改變,還是偶數,會進入死循環。在continue前面加一句x += 1即可。如下:if x%2==0:? ? ? ??x += 1? ? ? ? continue
2016-12-23
已采納回答 / 慕少8277993
for x in range(1,10):? ? for y in range(0,10):? ? ? ? if x<y:? ? ? ? ? ? print x*10+y你的打印十個x字符再加一個y字符
2016-12-22