Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_triple_products(n1, n2, n3):
- sum = 0
- for i in range(1, n1 + 1):
- sum += i * (i + 2) * (i + 3)
- return sum
- n1 = int(input("Enter the value of n1: "))
- n2 = int(input("Enter the value of n2: "))
- n3 = int(input("Enter the value of n3: "))
- sum = sum_of_triple_products(n1, n2, n3)
- print("Sum of the series:", sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement