• Register

Recent questions tagged sum

0 votes
1 answer 1 view
Problem: I have recently started learning SQL. I want to know which one of the following is not an SQL function: COUNT SUM AVG Mode Please explain the rest of the functions too. Thanks!
asked 33 minutes ago Code Learner 7k points
0 votes
1 answer 7 views
Problem: How can I find the values in an array whose sum equals some given value?
asked Feb 27 Code Learner 7k points
0 votes
1 answer 6 views
Problem: I have a list of numbers, e.g. numbers = [1, 2, 3, 7, 7, 9, 10] As you can see, numbers may appear more than once in this list. I need to get all combinations of these numbers that have a given sum, e.g. 10. The items in the combinations may ... length restrictions for the combinations, [10] is as valid as [1, 2, 7]. How can I create a list of all combinations meeting the criteria above?
asked Feb 22 Ali 6.5k points
0 votes
1 answer 44 views
Problem: write two nested for loops to calculate the following double summation
asked Feb 12 Dan phillip 2.4k points
0 votes
1 answer 20 views
Problem Hey, I have a problem in finding the sum of squared errors and R^2 after glm My formula is glm(formula = total ~ yr * mnth, data = daytots) mnth and yr are factors and total is numerical I want to find the sample sum of square error and R^2. but i think glm() function is not able to return both of them. Can someone help me to know how to find them?
asked Jan 15 chris jordan 2.4k points
0 votes
1 answer 110 views
Problem: Beginner here! I have got an assignment in which I have to write a program that finds the sum of array elements taken as input from the user. I have to define a function that calculates the sum and returns the sum. The program should print the sum on the ... logic is not so strong so I just failed to build logic. Could anyone from here help me find the solution to this task? Thanks!
asked Jan 8 Code Learner 7k points
0 votes
1 answer 52 views
Problem: Beginner here- I got an assignment in which I have to write a program in C# that prints the sum of all the numbers that are either divisible by 3 or 5. I did many attempts but failed every time, and now I am feeling to give up on the programming. I want to try for one last time if I can understand the logic or not. Can anybody here help me, please?
asked Jan 4 Code Learner 7k points
0 votes
1 answer 53 views
Problem: I am a novice Java programmer who started learning to program in Java just a few weeks ago. I got an assignment from my tutor in which I have to write a program that prints the sum of the elements of a given array. The output of the program should be ... } I am allowed to take help from the Internet so asking for help from you guys. Can anybody please provide me with a solution? Thanks!
asked Dec 29, 2020 Code Learner 7k points
0 votes
1 answer 45 views
Problem: Using this code we find the sum of diagonal elements of a square matrix.For example, for a 2 x 2 matrix, the sum of diagonal elements of the matrix {1,2,3,4} will be equal to 5. Example 1 2 3 4 Sum = 1+4 = 5
asked Dec 22, 2020 Mashhoodch 10.8k points
0 votes
1 answer 39 views
Problem: Hi, i have php project of sales and purchase. I want to calculate the sum of sales for one product. Which funtion i should use to Calculate sum (total) of column in php
asked Nov 11, 2020 prog_learner 2.5k points
0 votes
1 answer 16 views
Problem: Is there possibility of sum of ArrayList without looping List tt = new ArrayList(); tt.add(1); tt.add(2); tt.add(3);
asked Nov 4, 2020 Mashhoodch 10.8k points
0 votes
1 answer 196 views
I understand the questions but the thing that im not sure about is the part it says "using functions". here is my code and wonder if its acceptable; x= int(input("Enter first number:")) y= int(input("Enter second number:")) sum=x+y average=sum/2 print("Sum of the given two numbers is:", sum) print("Average of the given numbers is:", average)
asked Oct 28, 2020 psandprop 2.4k points
1 vote
2 answers 145 views
I am trying to find out the sum of the diagonal elements in a matrix. Here, n is the size of the square matrix and a is the matrix. Can someone explain this to me what is happening here. n = 3 a = [[11,2,4],[4,5,6],[10,8,-12]] sum_first_diagonal = sum(a[i][i] for i in range(n)) sum_second_diagonal = sum(a[n-i-1][n-i-1] for i in range(n)) print(str(sum_first_diagonal)+" "+str(sum_first_diag
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 298 views
As I analyzed it I have arrived on a conclusion but I don't think that its gonna work so I would appreciate if you correct it. If I want to enter a number again to be added on the sum variable what can be the decision ? Start Initialize counter = 0 , sum = 0 Input N N % 3 == ... else if counter != N { If true , loop back to " Input N " else print sum } else , N not divisible by 3 . Print sum End
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 21 views
Problem: Hello kodlogs, I am new to python language basically this is the first language I am learning as friend say is the easy language, and so wanted to learn more about it, but I am doing a simple for sum program and about the list by sum( ), I am able to achieve it but, I have to do it without the function how can I achieve this.
asked Jun 26, 2020 Gavin 15.3k points
0 votes
1 answer 106 views
I started programming recently, I have learned some basic programming topics like loops, array and many more. But they are not enough to implement my concept in java. I can write a void method that can take 2 or more parameters and print the summation of all parameters. But now I want to ... * @param a * @param b */ public static void add(int a, int b){ int sum = a+b; System.out.println(sum); }
asked May 3, 2020 samhaz 5k points
To see more, click for the full list of questions or popular tags.