Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_of_n(n):
- return (n * (n + 1)) // 2
- n = int(input("Enter the value of N: "))
- sum = sum_of_n(n)
- print("Sum of the series:", sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement