最赞回答 / 幕布斯4328471
num = 2sum = 0while True: if num >= 1000: break sum = sum + num num = num + 2print(sum)小写t改成大写t就可以了。
2020-11-06
已采纳回答 / 因为是库里呀
我给你举个例子 最后一次 当a= 1000,满足循环,仍进行一遍语句,最后一句是a=a+2,也就是这时候a= 1000+2=1002当a=1002,不满足a <= 1000,这时候你print(a)当然就是1002咯
2020-11-03
最新回答 / my藤上风铃
# Enter a code# coding:utf-8names = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']scores = [89, 72, 88, 79, 99]templateNames = []templateScores = [89, 72, 88, 79, 99]scores.sort(reverse=True)print("降序排列后的成绩:" + str(scores))index_Score = 0index_TemplateScore...
2020-10-25
最新回答 / 一馋小和尚
a = r'''"To be, or not to be":that is the question.Whether it\'s nobler in the mind to suffer.''''
2020-10-22