最新回答 / 慕少1566150
num=1sum=0k=1while True: if num>1000: break; num=2*k-1 sum=sum+num k=k+1print(sum)这样也可以的哟
2021-12-01
建议isdisjoint这段描述可以说是 判断两个集合是否没有交集,和函数的实际含义保持一致,读者可能会混淆 哈哈 比如我
2021-11-28
template='dong dong qiang age={}'
age='19'
result=template.format(age)
if age>=18:
print('adult',result)
age='19'
result=template.format(age)
if age>=18:
print('adult',result)
2021-11-27
print(r''' '\"TO be,or not to be \":that is the question.\n When ther it\'s nobler in the mind to suffer.' ''')
2021-11-20
num1=3.14
num2=1.57
a=num1*num2
print(round(a)) #==>4.93
num2=1.57
a=num1*num2
print(round(a)) #==>4.93
2021-11-18
最赞回答 / 是小丹泓呀
# Enter a coded = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}m = 0for key in d.keys(): m += 1print(m)n = 0for x in d: n = n + 1 print(x) #打印出来看看print(n)y = 0for s in d.values(): y += 1 print(s)print(y)感觉可以
2021-11-16
# Enter a code
def square_of_sum(l):
sum=0
for x in l:
sum=sum+x*x
return(sum)
print(square_of_sum([2,6,4,5]))
def square_of_sum(l):
sum=0
for x in l:
sum=sum+x*x
return(sum)
print(square_of_sum([2,6,4,5]))
2021-11-13