1. python program for add natural numbers

n=int(input("enter the number")) sum=0 i=1 while i<=n:

     sum=sum+i
     i=i+1

print("the sum is",sum)

Start a discussion with MANSI121999

Start a discussion