Computer Science, asked by sanjanachakalabbi, 9 months ago

write a program to print sum of n natural numbers (python programming language)​

Answers

Answered by coronavirus1919
4

ello user

number = int(input("Please Enter any Number: "))

total = 0

for value in range(1, number + 1):

total = total + value

print("The Sum of Natural Numbers from 1 to {0} = {1}".format(number, total))

Hope this helps

Similar questions