Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

s=0 def sum(x,y): n=int(input("enter no. of terms") for i in range(n): l=int(input("enter no.")) s=s+l print(s) sum()

s=0
def sum(x,y):
    n=int(input("enter no. of terms")
          for i in range(n):
          l=int(input("enter no."))
          s=s+l
    print(s)
sum()
 
PREVIOUS NEXT
Tagged: #def
ADD COMMENT
Topic
Name
2+1 =