Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

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()

Amused Addax answered on June 23, 2021 Popularity 3/10 Helpfulness 2/10

Contents


More Related Answers

  • python program to find sum of digits of a number using while loop
  • olst = [] a = int(input()) b = int(input()) for ele in range(a,b+1): if ele%2 != 0: olst.append(ele) print(olst[::-1])
  • a function that prints all numbers from 0 - n Added together python
  • how to use sum with range python
  • program to find sum till n natural numbers in python
  • Accept number from user and calculate the sum of all number from 1 to a given number
  • Print the sum of all the inputs from the user until it enters the 0
  • Accept number from user and calculate the sum of all number from 1 to a given number
  • the sum of the digits of the numbers ending with the digit 7 c++
  • sum of digits
  • sum of all n integers
  • Sum All Numbers in a Range
  • int sum = 0; for(int i = 10; i > 0; i -= 3) { sum += i; } System.out.println(sum);
  • a=input("enter the number whose table you want to see") for i in range(0,11): print( %s,'x',i,'=' , %s *i,(a))
  • Which block of code will sum the numbers from 1 to n (including n) and store it in the variable "sum"?
  • i=int(input("enter the number")); sum=0; pro=1; while(i>0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro);
  • sum in range
  • #include <iostream> using namespace std; int main(){ int sum1 = 100+50; int sum2 = sum1+250; int sum3 = sum2+sum2; cout<< sum1 << "\n"; cout<< sum2 << "\n"; cout<< sum3 << "\n"; return 0; }
  • input 5 numbers and print their sum using while loop
  • WAP in C to input n numbers in an array, find out the sum of odd nos. and even nos. Display the numbers whose sum is high.
  • Code of getting sum of digits
  • wap in python to print the sum of the series 1 + 1/2! + 1/3!
  • Ways to write n as sum
  • suma = 0 for i in range(10): suma = suma + i print(suma)
  • 1+1/2+1/3+...+1/n sum formula in python using for loop
  • 1. Sum of integers between ‘a’ and ‘b’#
  • . You have written a function to add two numbers: int Add(int a, int b) { return a+b; } The above function takes two numbers as input and returns their sum.
  • . You have written a function to add two numbers: int Add(int a, int b) { return a+b; } The above function takes two numbers as input and returns their sum.
  • Problem Statement For an integer n, let S(n) be the sum of digits in the decimal notation of n. For example, we have S(123) = 1 + 2 + 3 = 6 Given two 3-digit integers A and B, find the greater of S(A) and S(B). Constraints • All values in input are inte

  • 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()

    0
    Popularity 3/10 Helpfulness 2/10 Language python
    Source: Grepper
    Tags: python
    Link to this answer
    Share Copy Link
    Contributed on Jun 23 2021
    Amused Addax
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.