Exercism: Difference Of Squares (Python)


平方和  ( n(n-1)/2 )** 2
平方的和  (n * (n + 1) * (2n + 1) / 6

def square_of_sum(number):
    return sum(i for i in range(1,number+1)) ** 2

def sum_of_squares(number):
    return sum(i ** 2 for i in range(1, number+1))

def difference_of_squares(number):
    return square_of_sum(number) - sum_of_squares(number) 


  1. The company plans to proceed developing their providers till everybody on the planet can afford secure and affordable housing. With today’s new constructing supplies, houses may be constructed in 24 hours with 3D printing. The 3D printing industry is valued at greater than $17 billion and it is anticipated to greater than double that pvc water guns by 2026.




Exercism: RNA Transcription (Python)

拜厄练习曲44, 45

拜厄练习曲38, 39