# addtion of all numbers till given number def summation(num): n = 1 sum = 0; while n <= num: sum = sum + n n+=1 return (sum)