n=7
sum=0
i=1
while i<=n:
    sum+=i
    i+=1
print("total sum =",sum)    
    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: